reset
This commit is contained in:
parent
6f7774cb56
commit
44fc3d62bd
@ -70,7 +70,7 @@ class LoginMiddleware
|
|||||||
|
|
||||||
//给request赋值,用于控制器
|
//给request赋值,用于控制器
|
||||||
$request->adminInfo = $adminInfo;
|
$request->adminInfo = $adminInfo;
|
||||||
$request->adminId = $adminInfo['admin_id'] ?: 0;
|
$request->adminId = $adminInfo['admin_id'] ?? 0;
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ class OperationLog
|
|||||||
|
|
||||||
//记录日志
|
//记录日志
|
||||||
$systemLog = new \app\common\model\OperationLog();
|
$systemLog = new \app\common\model\OperationLog();
|
||||||
$systemLog->admin_id = $request->adminInfo['admin_id'] ?: 0;
|
$systemLog->admin_id = $request->adminInfo['admin_id'] ?? 0;
|
||||||
$systemLog->admin_name = $request->adminInfo['name'] ?? '';
|
$systemLog->admin_name = $request->adminInfo['name'] ?? '';
|
||||||
$systemLog->action = $notes;
|
$systemLog->action = $notes;
|
||||||
$systemLog->account = $request->adminInfo['account'] ?? '';
|
$systemLog->account = $request->adminInfo['account'] ?? '';
|
||||||
|
@ -41,15 +41,15 @@ class AdministrativePaymentsLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
AdministrativePayments::create([
|
AdministrativePayments::create([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'approve_id' => $params['approve_id'] ?: 0,
|
'approve_id' => $params['approve_id'] ?? 0,
|
||||||
'administrative_contract_id' => $params['administrative_contract_id'] ?: 0,
|
'administrative_contract_id' => $params['administrative_contract_id'] ?? 0,
|
||||||
'applier' => $params['applier'] ?? '',
|
'applier' => $params['applier'] ?? '',
|
||||||
'apply_date' => $params['apply_date'] ?? '',
|
'apply_date' => $params['apply_date'] ?? '',
|
||||||
'pay_type' => $params['pay_type'] ?: 0,
|
'pay_type' => $params['pay_type'] ?? 0,
|
||||||
'payment_rate' => $params['payment_rate'] ?: 0,
|
'payment_rate' => $params['payment_rate'] ?? 0,
|
||||||
'payment_amount' => $params['payment_amount'] ?: 0,
|
'payment_amount' => $params['payment_amount'] ?? 0,
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex'] ?? '',
|
'annex' => $params['annex'] ?? '',
|
||||||
'deposit_bank' => $params['deposit_bank'] ?? '',
|
'deposit_bank' => $params['deposit_bank'] ?? '',
|
||||||
|
@ -41,17 +41,17 @@ class AdministrativeTicketCollectionLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
AdministrativeTicketCollection::create([
|
AdministrativeTicketCollection::create([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'administrative_contract_id' => $params['administrative_contract_id'] ?: 0,
|
'administrative_contract_id' => $params['administrative_contract_id'] ?? 0,
|
||||||
'invoicing_date' => $params['invoicing_date'] ?? '',
|
'invoicing_date' => $params['invoicing_date'] ?? '',
|
||||||
'commitor' => $params['commitor'] ?? '',
|
'commitor' => $params['commitor'] ?? '',
|
||||||
'invoice_type' => $params['invoice_type'] ?: 0,
|
'invoice_type' => $params['invoice_type'] ?? 0,
|
||||||
'invoice_sn' => $params['invoice_sn'] ?? '',
|
'invoice_sn' => $params['invoice_sn'] ?? '',
|
||||||
'invoice_amount' => $params['invoice_amount'] ?: 0,
|
'invoice_amount' => $params['invoice_amount'] ?? 0,
|
||||||
'invoice_tax_rate' => $params['invoice_tax_rate'] ?: 0,
|
'invoice_tax_rate' => $params['invoice_tax_rate'] ?? 0,
|
||||||
'tax' => $params['tax'] ?: 0,
|
'tax' => $params['tax'] ?? 0,
|
||||||
'amount_excluding_tax' => $params['amount_excluding_tax'] ?: 0,
|
'amount_excluding_tax' => $params['amount_excluding_tax'] ?? 0,
|
||||||
'receipt_date' => $params['receipt_date'] ?? '',
|
'receipt_date' => $params['receipt_date'] ?? '',
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex'] ?? '',
|
'annex' => $params['annex'] ?? '',
|
||||||
|
@ -38,7 +38,7 @@ class ArticleCateLogic extends BaseLogic
|
|||||||
ArticleCate::create([
|
ArticleCate::create([
|
||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'is_show' => $params['is_show'],
|
'is_show' => $params['is_show'],
|
||||||
'sort' => $params['sort'] ?: 0
|
'sort' => $params['sort'] ?? 0
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class ArticleCateLogic extends BaseLogic
|
|||||||
'id' => $params['id'],
|
'id' => $params['id'],
|
||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'is_show' => $params['is_show'],
|
'is_show' => $params['is_show'],
|
||||||
'sort' => $params['sort'] ?: 0
|
'sort' => $params['sort'] ?? 0
|
||||||
]);
|
]);
|
||||||
return true;
|
return true;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
@ -38,9 +38,9 @@ class ArticleLogic extends BaseLogic
|
|||||||
'title' => $params['title'],
|
'title' => $params['title'],
|
||||||
'desc' => $params['desc'] ?? '',
|
'desc' => $params['desc'] ?? '',
|
||||||
'author' => $params['author'] ?? '', //作者
|
'author' => $params['author'] ?? '', //作者
|
||||||
'sort' => $params['sort'] ?: 0, // 排序
|
'sort' => $params['sort'] ?? 0, // 排序
|
||||||
'abstract' => $params['abstract'], // 文章摘要
|
'abstract' => $params['abstract'], // 文章摘要
|
||||||
'click_virtual' => $params['click_virtual'] ?: 0,
|
'click_virtual' => $params['click_virtual'] ?? 0,
|
||||||
'image' => $params['image'] ? FileService::setFileUrl($params['image']) : '',
|
'image' => $params['image'] ? FileService::setFileUrl($params['image']) : '',
|
||||||
'cid' => $params['cid'],
|
'cid' => $params['cid'],
|
||||||
'is_show' => $params['is_show'],
|
'is_show' => $params['is_show'],
|
||||||
@ -64,9 +64,9 @@ class ArticleLogic extends BaseLogic
|
|||||||
'title' => $params['title'],
|
'title' => $params['title'],
|
||||||
'desc' => $params['desc'] ?? '', // 简介
|
'desc' => $params['desc'] ?? '', // 简介
|
||||||
'author' => $params['author'] ?? '', //作者
|
'author' => $params['author'] ?? '', //作者
|
||||||
'sort' => $params['sort'] ?: 0, // 排序
|
'sort' => $params['sort'] ?? 0, // 排序
|
||||||
'abstract' => $params['abstract'], // 文章摘要
|
'abstract' => $params['abstract'], // 文章摘要
|
||||||
'click_virtual' => $params['click_virtual'] ?: 0,
|
'click_virtual' => $params['click_virtual'] ?? 0,
|
||||||
'image' => $params['image'] ? FileService::setFileUrl($params['image']) : '',
|
'image' => $params['image'] ? FileService::setFileUrl($params['image']) : '',
|
||||||
'cid' => $params['cid'],
|
'cid' => $params['cid'],
|
||||||
'is_show' => $params['is_show'],
|
'is_show' => $params['is_show'],
|
||||||
|
@ -48,7 +48,7 @@ class RoleLogic extends BaseLogic
|
|||||||
$role = SystemRole::create([
|
$role = SystemRole::create([
|
||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'desc' => $params['desc'] ?? '',
|
'desc' => $params['desc'] ?? '',
|
||||||
'sort' => $params['sort'] ?: 0,
|
'sort' => $params['sort'] ?? 0,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$data = [];
|
$data = [];
|
||||||
@ -99,7 +99,7 @@ class RoleLogic extends BaseLogic
|
|||||||
'id' => $params['id'],
|
'id' => $params['id'],
|
||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'desc' => $params['desc'] ?? '',
|
'desc' => $params['desc'] ?? '',
|
||||||
'sort' => $params['sort'] ?: 0,
|
'sort' => $params['sort'] ?? 0,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (!empty($menuId)) {
|
if (!empty($menuId)) {
|
||||||
|
@ -41,19 +41,19 @@ class RevenueExpenditureStatementLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
RevenueExpenditureStatement::create([
|
RevenueExpenditureStatement::create([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'document_type' => $params['document_type'] ?: 0,
|
'document_type' => $params['document_type'] ?? 0,
|
||||||
'document_no' => $params['document_no'] ?? '',
|
'document_no' => $params['document_no'] ?? '',
|
||||||
'contract_id' => $params['contract_id'] ?: 0,
|
'contract_id' => $params['contract_id'] ?? 0,
|
||||||
'contract_type' => $params['contract_type'] ?: 0,
|
'contract_type' => $params['contract_type'] ?? 0,
|
||||||
'bank_account_id' => $params['bank_account_id'] ?: 0,
|
'bank_account_id' => $params['bank_account_id'] ?? 0,
|
||||||
'create_date' => $params['create_date'] ?? '',
|
'create_date' => $params['create_date'] ?? '',
|
||||||
'handled_by' => $params['handled_by'] ?: 0,
|
'handled_by' => $params['handled_by'] ?? 0,
|
||||||
'amount' => $params['amount'] ?: 0,
|
'amount' => $params['amount'] ?? 0,
|
||||||
'is_generate_vouchers' => $params['is_generate_vouchers'] ?: 0,
|
'is_generate_vouchers' => $params['is_generate_vouchers'] ?? 0,
|
||||||
'vouchers_sn' => $params['vouchers_sn'] ?? '',
|
'vouchers_sn' => $params['vouchers_sn'] ?? '',
|
||||||
'is_interest' => $params['is_interest'] ?: 0,
|
'is_interest' => $params['is_interest'] ?? 0,
|
||||||
'interest_date' => $params['interest_date'] ?? '',
|
'interest_date' => $params['interest_date'] ?? '',
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex'] ?? '',
|
'annex' => $params['annex'] ?? '',
|
||||||
@ -81,19 +81,19 @@ class RevenueExpenditureStatementLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
RevenueExpenditureStatement::where('id', $params['id'])->update([
|
RevenueExpenditureStatement::where('id', $params['id'])->update([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'document_type' => $params['document_type'] ?: 0,
|
'document_type' => $params['document_type'] ?? 0,
|
||||||
'document_no' => $params['document_no'] ?? '',
|
'document_no' => $params['document_no'] ?? '',
|
||||||
'contract_id' => $params['contract_id'] ?: 0,
|
'contract_id' => $params['contract_id'] ?? 0,
|
||||||
'contract_type' => $params['contract_type'] ?: 0,
|
'contract_type' => $params['contract_type'] ?? 0,
|
||||||
'bank_account_id' => $params['bank_account_id'] ?: 0,
|
'bank_account_id' => $params['bank_account_id'] ?? 0,
|
||||||
'create_date' => $params['create_date'] ?? '',
|
'create_date' => $params['create_date'] ?? '',
|
||||||
'handled_by' => $params['handled_by'] ?: 0,
|
'handled_by' => $params['handled_by'] ?? 0,
|
||||||
'amount' => $params['amount'] ?: 0,
|
'amount' => $params['amount'] ?? 0,
|
||||||
'is_generate_vouchers' => $params['is_generate_vouchers'] ?: 0,
|
'is_generate_vouchers' => $params['is_generate_vouchers'] ?? 0,
|
||||||
'vouchers_sn' => $params['vouchers_sn'] ?? '',
|
'vouchers_sn' => $params['vouchers_sn'] ?? '',
|
||||||
'is_interest' => $params['is_interest'] ?: 0,
|
'is_interest' => $params['is_interest'] ?? 0,
|
||||||
'interest_date' => $params['interest_date'] ?? '',
|
'interest_date' => $params['interest_date'] ?? '',
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex'] ?? '',
|
'annex' => $params['annex'] ?? '',
|
||||||
|
@ -46,16 +46,16 @@ class BidBiddingDecisionLogic extends BaseLogic
|
|||||||
'code' => data_unique_code('投标决策'),
|
'code' => data_unique_code('投标决策'),
|
||||||
'project_id' => $params['project_id'],
|
'project_id' => $params['project_id'],
|
||||||
'project_estimation' => $params['project_estimation'],
|
'project_estimation' => $params['project_estimation'],
|
||||||
'bidding_project_fund_source' => $params['bidding_project_fund_source'] ?: 0,
|
'bidding_project_fund_source' => $params['bidding_project_fund_source'] ?? 0,
|
||||||
'bidding_time' => !empty($params['bidding_time']) ? strtotime($params['bidding_time']) : 0,
|
'bidding_time' => !empty($params['bidding_time']) ? strtotime($params['bidding_time']) : 0,
|
||||||
'bid_type' => $params['bid_type'] ?: 0,
|
'bid_type' => $params['bid_type'] ?? 0,
|
||||||
'competitor' => $params['competitor'] ?? '',
|
'competitor' => $params['competitor'] ?? '',
|
||||||
'is_margin' => $params['is_margin'] ?: 0,
|
'is_margin' => $params['is_margin'] ?? 0,
|
||||||
'margin_amount' => $params['margin_amount'] ?: 0,
|
'margin_amount' => $params['margin_amount'] ?? 0,
|
||||||
'bid_opening_date' => !empty($params['bid_opening_date']) ? strtotime($params['bid_opening_date']) : 0,
|
'bid_opening_date' => !empty($params['bid_opening_date']) ? strtotime($params['bid_opening_date']) : 0,
|
||||||
'margin_amount_return_date' => !empty($params['margin_amount_return_date']) ? strtotime($params['margin_amount_return_date']) : 0,
|
'margin_amount_return_date' => !empty($params['margin_amount_return_date']) ? strtotime($params['margin_amount_return_date']) : 0,
|
||||||
'is_internal_resources' => $params['is_internal_resources'] ?: 0,
|
'is_internal_resources' => $params['is_internal_resources'] ?? 0,
|
||||||
'project_assurance' => $params['project_assurance'] ?: 0,
|
'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']? json_encode($params['annex']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
@ -88,16 +88,16 @@ class BidBiddingDecisionLogic extends BaseLogic
|
|||||||
BidBiddingDecision::where('id', $params['id'])->update([
|
BidBiddingDecision::where('id', $params['id'])->update([
|
||||||
'project_id' => $params['project_id'],
|
'project_id' => $params['project_id'],
|
||||||
'project_estimation' => $params['project_estimation'],
|
'project_estimation' => $params['project_estimation'],
|
||||||
'bidding_project_fund_source' => $params['bidding_project_fund_source'] ?: 0,
|
'bidding_project_fund_source' => $params['bidding_project_fund_source'] ?? 0,
|
||||||
'bidding_time' => !empty($params['bidding_time']) ? strtotime($params['bidding_time']) : 0,
|
'bidding_time' => !empty($params['bidding_time']) ? strtotime($params['bidding_time']) : 0,
|
||||||
'bid_type' => $params['bid_type'] ?: 0,
|
'bid_type' => $params['bid_type'] ?? 0,
|
||||||
'competitor' => $params['competitor'] ?? '',
|
'competitor' => $params['competitor'] ?? '',
|
||||||
'is_margin' => $params['is_margin'] ?: 0,
|
'is_margin' => $params['is_margin'] ?? 0,
|
||||||
'margin_amount' => $params['margin_amount'] ?: 0,
|
'margin_amount' => $params['margin_amount'] ?? 0,
|
||||||
'bid_opening_date' => !empty($params['bid_opening_date']) ? strtotime($params['bid_opening_date']) : 0,
|
'bid_opening_date' => !empty($params['bid_opening_date']) ? strtotime($params['bid_opening_date']) : 0,
|
||||||
'margin_amount_return_date' => !empty($params['margin_amount_return_date']) ? strtotime($params['margin_amount_return_date']) : 0,
|
'margin_amount_return_date' => !empty($params['margin_amount_return_date']) ? strtotime($params['margin_amount_return_date']) : 0,
|
||||||
'is_internal_resources' => $params['is_internal_resources'] ?: 0,
|
'is_internal_resources' => $params['is_internal_resources'] ?? 0,
|
||||||
'project_assurance' => $params['project_assurance'] ?: 0,
|
'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']? json_encode($params['annex']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
|
@ -50,8 +50,8 @@ class BidBuyBiddingDocumentLogic extends BaseLogic
|
|||||||
'bid_document_no' => data_unique_code('购买标书'),
|
'bid_document_no' => data_unique_code('购买标书'),
|
||||||
'invite_tenders_company_name' => $params['invite_tenders_company_name'],
|
'invite_tenders_company_name' => $params['invite_tenders_company_name'],
|
||||||
'bid_company_name' => $params['bid_company_name'],
|
'bid_company_name' => $params['bid_company_name'],
|
||||||
'buyer' => $params['buyer'] ?: 0,
|
'buyer' => $params['buyer'] ?? 0,
|
||||||
'amount' => $params['amount'] ?: 0,
|
'amount' => $params['amount'] ?? 0,
|
||||||
'buy_date' => !empty($params['buy_date']) ? strtotime($params['buy_date']) : 0,
|
'buy_date' => !empty($params['buy_date']) ? strtotime($params['buy_date']) : 0,
|
||||||
]);
|
]);
|
||||||
Db::commit();
|
Db::commit();
|
||||||
@ -80,8 +80,8 @@ class BidBuyBiddingDocumentLogic extends BaseLogic
|
|||||||
'bid_decision_id' => $params['bid_decision_id'],
|
'bid_decision_id' => $params['bid_decision_id'],
|
||||||
'invite_tenders_company_name' => $params['invite_tenders_company_name'],
|
'invite_tenders_company_name' => $params['invite_tenders_company_name'],
|
||||||
'bid_company_name' => $params['bid_company_name'],
|
'bid_company_name' => $params['bid_company_name'],
|
||||||
'buyer' => $params['buyer'] ?: 0,
|
'buyer' => $params['buyer'] ?? 0,
|
||||||
'amount' => $params['amount'] ?: 0,
|
'amount' => $params['amount'] ?? 0,
|
||||||
'buy_date' => !empty($params['buy_date']) ? strtotime($params['buy_date']) : 0,
|
'buy_date' => !empty($params['buy_date']) ? strtotime($params['buy_date']) : 0,
|
||||||
'update_time' => time(),
|
'update_time' => time(),
|
||||||
]);
|
]);
|
||||||
|
@ -54,8 +54,8 @@ class BidDocumentExaminationLogic extends BaseLogic
|
|||||||
'technical_protocol_deviation' => $params['technical_protocol_deviation'] ?? '',
|
'technical_protocol_deviation' => $params['technical_protocol_deviation'] ?? '',
|
||||||
'protocol_deviation_handling_plan' => $params['protocol_deviation_handling_plan'] ?? '',
|
'protocol_deviation_handling_plan' => $params['protocol_deviation_handling_plan'] ?? '',
|
||||||
'technical_review_annex' => !empty($params['technical_review_annex']) ? $params['technical_review_annex'] : null,
|
'technical_review_annex' => !empty($params['technical_review_annex']) ? $params['technical_review_annex'] : null,
|
||||||
'tax_rate' => $params['tax_rate'] ?: 0,
|
'tax_rate' => $params['tax_rate'] ?? 0,
|
||||||
'pay_type' => $params['pay_type'] ?: 0,
|
'pay_type' => $params['pay_type'] ?? 0,
|
||||||
'pay_rate' => $params['pay_rate'] ?? '',
|
'pay_rate' => $params['pay_rate'] ?? '',
|
||||||
'business_contract_deviation' => $params['business_contract_deviation'] ?? '',
|
'business_contract_deviation' => $params['business_contract_deviation'] ?? '',
|
||||||
'business_contract_deviation_handling_plan' => $params['business_contract_deviation_handling_plan'] ?? '',
|
'business_contract_deviation_handling_plan' => $params['business_contract_deviation_handling_plan'] ?? '',
|
||||||
@ -69,7 +69,7 @@ class BidDocumentExaminationLogic extends BaseLogic
|
|||||||
'bid_document_examination_id' => $bidDocumentExamination->id,
|
'bid_document_examination_id' => $bidDocumentExamination->id,
|
||||||
'product_id' => $item['product_id'],
|
'product_id' => $item['product_id'],
|
||||||
'num' => $item['num'],
|
'num' => $item['num'],
|
||||||
'points' => $item['points'] ?: 0,
|
'points' => $item['points'] ?? 0,
|
||||||
'cost_price' => $item['cost_price'],
|
'cost_price' => $item['cost_price'],
|
||||||
'sale_price' => $item['sale_price'],
|
'sale_price' => $item['sale_price'],
|
||||||
'cost_amount' => $item['cost_price'] * $item['num'],
|
'cost_amount' => $item['cost_price'] * $item['num'],
|
||||||
|
@ -53,7 +53,7 @@ class BidSecurityRefundLogic extends BaseLogic
|
|||||||
'refund_date' => strtotime($params['refund_date']),
|
'refund_date' => strtotime($params['refund_date']),
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
'bank_account_id' => $params['bank_account_id'] ?: 0,
|
'bank_account_id' => $params['bank_account_id'] ?? 0,
|
||||||
]);
|
]);
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return true;
|
return true;
|
||||||
@ -84,7 +84,7 @@ class BidSecurityRefundLogic extends BaseLogic
|
|||||||
'refund_date' => strtotime($params['refund_date']),
|
'refund_date' => strtotime($params['refund_date']),
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
'bank_account_id' => $params['bank_account_id'] ?: 0,
|
'bank_account_id' => $params['bank_account_id'] ?? 0,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Db::commit();
|
Db::commit();
|
||||||
|
@ -41,18 +41,18 @@ class AcceptanceBillLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
AcceptanceBill::create([
|
AcceptanceBill::create([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'customer_id' => $params['customer_id'] ?: 0,
|
'customer_id' => $params['customer_id'] ?? 0,
|
||||||
'project_id' => $params['project_id'] ?: 0,
|
'project_id' => $params['project_id'] ?? 0,
|
||||||
'contract_id' => $params['contract_id'] ?: 0,
|
'contract_id' => $params['contract_id'] ?? 0,
|
||||||
'receipt_date' => $params['receipt_date'] ?? '',
|
'receipt_date' => $params['receipt_date'] ?? '',
|
||||||
'bill_sn' => $params['bill_sn'] ?? '',
|
'bill_sn' => $params['bill_sn'] ?? '',
|
||||||
'bank_account_id' => $params['bank_account_id'] ?: 0,
|
'bank_account_id' => $params['bank_account_id'] ?? 0,
|
||||||
'bill_type' => $params['bill_type'] ?: 0,
|
'bill_type' => $params['bill_type'] ?? 0,
|
||||||
'draft_acceptance_bank' => $params['draft_acceptance_bank'] ?? '',
|
'draft_acceptance_bank' => $params['draft_acceptance_bank'] ?? '',
|
||||||
'bill_due_date' => $params['bill_due_date'] ?? '',
|
'bill_due_date' => $params['bill_due_date'] ?? '',
|
||||||
'receipt_amount' => $params['receipt_amount'] ?: 0,
|
'receipt_amount' => $params['receipt_amount'] ?? 0,
|
||||||
'receipt_amount_daxie' => $params['receipt_amount_daxie'] ?? '',
|
'receipt_amount_daxie' => $params['receipt_amount_daxie'] ?? '',
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex'] ?? '',
|
'annex' => $params['annex'] ?? '',
|
||||||
@ -80,18 +80,18 @@ class AcceptanceBillLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
AcceptanceBill::where('id', $params['id'])->update([
|
AcceptanceBill::where('id', $params['id'])->update([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'customer_id' => $params['customer_id'] ?: 0,
|
'customer_id' => $params['customer_id'] ?? 0,
|
||||||
'project_id' => $params['project_id'] ?: 0,
|
'project_id' => $params['project_id'] ?? 0,
|
||||||
'contract_id' => $params['contract_id'] ?: 0,
|
'contract_id' => $params['contract_id'] ?? 0,
|
||||||
'receipt_date' => $params['receipt_date'] ?? '',
|
'receipt_date' => $params['receipt_date'] ?? '',
|
||||||
'bill_sn' => $params['bill_sn'] ?? '',
|
'bill_sn' => $params['bill_sn'] ?? '',
|
||||||
'bank_account_id' => $params['bank_account_id'] ?: 0,
|
'bank_account_id' => $params['bank_account_id'] ?? 0,
|
||||||
'bill_type' => $params['bill_type'] ?: 0,
|
'bill_type' => $params['bill_type'] ?? 0,
|
||||||
'draft_acceptance_bank' => $params['draft_acceptance_bank'] ?? '',
|
'draft_acceptance_bank' => $params['draft_acceptance_bank'] ?? '',
|
||||||
'bill_due_date' => $params['bill_due_date'] ?? '',
|
'bill_due_date' => $params['bill_due_date'] ?? '',
|
||||||
'receipt_amount' => $params['receipt_amount'] ?: 0,
|
'receipt_amount' => $params['receipt_amount'] ?? 0,
|
||||||
'receipt_amount_daxie' => $params['receipt_amount_daxie'] ?? '',
|
'receipt_amount_daxie' => $params['receipt_amount_daxie'] ?? '',
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex'] ?? '',
|
'annex' => $params['annex'] ?? '',
|
||||||
|
@ -41,11 +41,11 @@ class RedemptionBillLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
RedemptionBill::create([
|
RedemptionBill::create([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'acceptance_bill_id' => $params['acceptance_bill_id'] ?: 0,
|
'acceptance_bill_id' => $params['acceptance_bill_id'] ?? 0,
|
||||||
'maturity_date' => $params['maturity_date'] ?? '',
|
'maturity_date' => $params['maturity_date'] ?? '',
|
||||||
'amount' => $params['amount'] ?: 0,
|
'amount' => $params['amount'] ?? 0,
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex'] ?? '',
|
'annex' => $params['annex'] ?? '',
|
||||||
'amount_daxie' => $params['amount_daxie'] ?? '',
|
'amount_daxie' => $params['amount_daxie'] ?? '',
|
||||||
@ -73,11 +73,11 @@ class RedemptionBillLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
RedemptionBill::where('id', $params['id'])->update([
|
RedemptionBill::where('id', $params['id'])->update([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'acceptance_bill_id' => $params['acceptance_bill_id'] ?: 0,
|
'acceptance_bill_id' => $params['acceptance_bill_id'] ?? 0,
|
||||||
'maturity_date' => $params['maturity_date'] ?? '',
|
'maturity_date' => $params['maturity_date'] ?? '',
|
||||||
'amount' => $params['amount'] ?: 0,
|
'amount' => $params['amount'] ?? 0,
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex'] ?? '',
|
'annex' => $params['annex'] ?? '',
|
||||||
'amount_daxie' => $params['amount_daxie'] ?? '',
|
'amount_daxie' => $params['amount_daxie'] ?? '',
|
||||||
|
@ -41,13 +41,13 @@ class TransferBillLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
TransferBill::create([
|
TransferBill::create([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'supplier_id' => $params['supplier_id'] ?: 0,
|
'supplier_id' => $params['supplier_id'] ?? 0,
|
||||||
'procurement_contract_id' => $params['procurement_contract_id'] ?: 0,
|
'procurement_contract_id' => $params['procurement_contract_id'] ?? 0,
|
||||||
'acceptance_bill_id' => $params['acceptance_bill_id'] ?: 0,
|
'acceptance_bill_id' => $params['acceptance_bill_id'] ?? 0,
|
||||||
'payment_date' => $params['payment_date'] ?? '',
|
'payment_date' => $params['payment_date'] ?? '',
|
||||||
'amount' => $params['amount'] ?: 0,
|
'amount' => $params['amount'] ?? 0,
|
||||||
'amount_daxie' => $params['amount_daxie'] ?? '',
|
'amount_daxie' => $params['amount_daxie'] ?? '',
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex'] ?? '',
|
'annex' => $params['annex'] ?? '',
|
||||||
@ -75,13 +75,13 @@ class TransferBillLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
TransferBill::where('id', $params['id'])->update([
|
TransferBill::where('id', $params['id'])->update([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'supplier_id' => $params['supplier_id'] ?: 0,
|
'supplier_id' => $params['supplier_id'] ?? 0,
|
||||||
'procurement_contract_id' => $params['procurement_contract_id'] ?: 0,
|
'procurement_contract_id' => $params['procurement_contract_id'] ?? 0,
|
||||||
'acceptance_bill_id' => $params['acceptance_bill_id'] ?: 0,
|
'acceptance_bill_id' => $params['acceptance_bill_id'] ?? 0,
|
||||||
'payment_date' => $params['payment_date'] ?? '',
|
'payment_date' => $params['payment_date'] ?? '',
|
||||||
'amount' => $params['amount'] ?: 0,
|
'amount' => $params['amount'] ?? 0,
|
||||||
'amount_daxie' => $params['amount_daxie'] ?? '',
|
'amount_daxie' => $params['amount_daxie'] ?? '',
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex'] ?? '',
|
'annex' => $params['annex'] ?? '',
|
||||||
|
@ -41,18 +41,18 @@ class AdministrativeContractLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
AdministrativeContract::create([
|
AdministrativeContract::create([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'supplier_id' => $params['supplier_id'] ?: 0,
|
'supplier_id' => $params['supplier_id'] ?? 0,
|
||||||
'contract_no' => data_unique_code('XZHT'),
|
'contract_no' => data_unique_code('XZHT'),
|
||||||
'contract_name' => $params['contract_name'] ?? '',
|
'contract_name' => $params['contract_name'] ?? '',
|
||||||
'procurement_type' => $params['procurement_type'] ?: 0,
|
'procurement_type' => $params['procurement_type'] ?? 0,
|
||||||
'asset_apply_no' => $params['asset_apply_no'] ?? '',
|
'asset_apply_no' => $params['asset_apply_no'] ?? '',
|
||||||
'start_date' => $params['start_date'] ?? '',
|
'start_date' => $params['start_date'] ?? '',
|
||||||
'end_date' => $params['end_date'] ?? '',
|
'end_date' => $params['end_date'] ?? '',
|
||||||
'signing_date' => $params['signing_date'] ?? '',
|
'signing_date' => $params['signing_date'] ?? '',
|
||||||
'pay_type' => $params['pay_type'] ?: 0,
|
'pay_type' => $params['pay_type'] ?? 0,
|
||||||
'amount' => $params['amount'] ?: 0,
|
'amount' => $params['amount'] ?? 0,
|
||||||
'amount_daxie' => $params['amount_daxie'] ?? '',
|
'amount_daxie' => $params['amount_daxie'] ?? '',
|
||||||
'main_content' => $params['main_content'] ?? '',
|
'main_content' => $params['main_content'] ?? '',
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
@ -81,17 +81,17 @@ class AdministrativeContractLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
AdministrativeContract::where('id', $params['id'])->update([
|
AdministrativeContract::where('id', $params['id'])->update([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'supplier_id' => $params['supplier_id'] ?: 0,
|
'supplier_id' => $params['supplier_id'] ?? 0,
|
||||||
'contract_name' => $params['contract_name'] ?? '',
|
'contract_name' => $params['contract_name'] ?? '',
|
||||||
'procurement_type' => $params['procurement_type'] ?: 0,
|
'procurement_type' => $params['procurement_type'] ?? 0,
|
||||||
'asset_apply_no' => $params['asset_apply_no'] ?? '',
|
'asset_apply_no' => $params['asset_apply_no'] ?? '',
|
||||||
'start_date' => $params['start_date'] ?? '',
|
'start_date' => $params['start_date'] ?? '',
|
||||||
'end_date' => $params['end_date'] ?? '',
|
'end_date' => $params['end_date'] ?? '',
|
||||||
'signing_date' => $params['signing_date'] ?? '',
|
'signing_date' => $params['signing_date'] ?? '',
|
||||||
'pay_type' => $params['pay_type'] ?: 0,
|
'pay_type' => $params['pay_type'] ?? 0,
|
||||||
'amount' => $params['amount'] ?: 0,
|
'amount' => $params['amount'] ?? 0,
|
||||||
'amount_daxie' => $params['amount_daxie'] ?? '',
|
'amount_daxie' => $params['amount_daxie'] ?? '',
|
||||||
'main_content' => $params['main_content'] ?? '',
|
'main_content' => $params['main_content'] ?? '',
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
|
@ -58,9 +58,9 @@ class ContractNegotiationLogic extends BaseLogic
|
|||||||
'negotiation_no' => data_unique_code('QS'),
|
'negotiation_no' => data_unique_code('QS'),
|
||||||
'negotiation_amount' => $params['negotiation_amount'],
|
'negotiation_amount' => $params['negotiation_amount'],
|
||||||
'negotiation_type' => $params['negotiation_type'],
|
'negotiation_type' => $params['negotiation_type'],
|
||||||
'labor_costs' => $params['labor_costs'] ?: 0,
|
'labor_costs' => $params['labor_costs'] ?? 0,
|
||||||
'material_costs' => $params['material_costs'] ?: 0,
|
'material_costs' => $params['material_costs'] ?? 0,
|
||||||
'warranty_amount' => $params['warranty_amount'] ?: 0,
|
'warranty_amount' => $params['warranty_amount'] ?? 0,
|
||||||
'warranty_expire_date' => !empty($params['Warranty_expire_date']) ? strtotime($params['Warranty_expire_date']) : 0,
|
'warranty_expire_date' => !empty($params['Warranty_expire_date']) ? strtotime($params['Warranty_expire_date']) : 0,
|
||||||
'profit' => $profit,
|
'profit' => $profit,
|
||||||
'profit_rate' => $profit_rate,
|
'profit_rate' => $profit_rate,
|
||||||
@ -102,9 +102,9 @@ class ContractNegotiationLogic extends BaseLogic
|
|||||||
'negotiation_no' => data_unique_code('QS'),
|
'negotiation_no' => data_unique_code('QS'),
|
||||||
'negotiation_amount' => $params['negotiation_amount'],
|
'negotiation_amount' => $params['negotiation_amount'],
|
||||||
'negotiation_type' => $params['negotiation_type'],
|
'negotiation_type' => $params['negotiation_type'],
|
||||||
'labor_costs' => $params['labor_costs'] ?: 0,
|
'labor_costs' => $params['labor_costs'] ?? 0,
|
||||||
'material_costs' => $params['material_costs'] ?: 0,
|
'material_costs' => $params['material_costs'] ?? 0,
|
||||||
'warranty_amount' => $params['warranty_amount'] ?: 0,
|
'warranty_amount' => $params['warranty_amount'] ?? 0,
|
||||||
'warranty_expire_date' => !empty($params['Warranty_expire_date']) ? strtotime($params['Warranty_expire_date']) : 0,
|
'warranty_expire_date' => !empty($params['Warranty_expire_date']) ? strtotime($params['Warranty_expire_date']) : 0,
|
||||||
'profit' => $profit,
|
'profit' => $profit,
|
||||||
'profit_rate' => $profit_rate,
|
'profit_rate' => $profit_rate,
|
||||||
|
@ -43,37 +43,37 @@ class ProcurementContractChangeLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
ProcurementContractChange::create([
|
ProcurementContractChange::create([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'procurement_contract_id' => $params['procurement_contract_id'] ?: 0,
|
'procurement_contract_id' => $params['procurement_contract_id'] ?? 0,
|
||||||
'supplier_id' => $params['supplier_id'] ?: 0,
|
'supplier_id' => $params['supplier_id'] ?? 0,
|
||||||
'project_id' => $params['project_id'] ?: 0,
|
'project_id' => $params['project_id'] ?? 0,
|
||||||
'contract_no' => $params['contract_no'] ?? '',
|
'contract_no' => $params['contract_no'] ?? '',
|
||||||
'supplier_contract_no' => $params['supplier_contract_no'] ?? '',
|
'supplier_contract_no' => $params['supplier_contract_no'] ?? '',
|
||||||
'contract_type' => $params['contract_type'] ?: 0,
|
'contract_type' => $params['contract_type'] ?? 0,
|
||||||
'signing_date' => strtotime($params['signing_date']),
|
'signing_date' => strtotime($params['signing_date']),
|
||||||
'pay_type' => $params['pay_type'] ?: 0,
|
'pay_type' => $params['pay_type'] ?? 0,
|
||||||
'account_period' => $params['account_period'] ?: 0,
|
'account_period' => $params['account_period'] ?? 0,
|
||||||
'amount' => $params['amount'] ?: 0,
|
'amount' => $params['amount'] ?? 0,
|
||||||
'amount_excluding_tax' => $params['amount_excluding_tax'] ?: 0,
|
'amount_excluding_tax' => $params['amount_excluding_tax'] ?? 0,
|
||||||
'amount_daxie' => $params['amount_daxie'] ?? '',
|
'amount_daxie' => $params['amount_daxie'] ?? '',
|
||||||
'retention_money_rate' => $params['retention_money_rate'] ?: 0,
|
'retention_money_rate' => $params['retention_money_rate'] ?? 0,
|
||||||
'retention_money' => $params['retention_money'] ?: 0,
|
'retention_money' => $params['retention_money'] ?? 0,
|
||||||
'pay_plan' => empty($params['pay_plan']) ? [] : json_encode($params['pay_plan']),
|
'pay_plan' => empty($params['pay_plan']) ? [] : json_encode($params['pay_plan']),
|
||||||
'remark' => $params['remark'] ?: 0,
|
'remark' => $params['remark'] ?? 0,
|
||||||
'annex' => $params['annex'] ?: 0,
|
'annex' => $params['annex'] ?? 0,
|
||||||
]);
|
]);
|
||||||
ProcurementContractDetail::where('procurement_contract_id', $params['procurement_contract_id'])->update(['delete_time' =>time()]);
|
ProcurementContractDetail::where('procurement_contract_id', $params['procurement_contract_id'])->update(['delete_time' =>time()]);
|
||||||
foreach ($params['material'] ?? [] as $item)
|
foreach ($params['material'] ?? [] as $item)
|
||||||
{
|
{
|
||||||
ProcurementContractDetail::create([
|
ProcurementContractDetail::create([
|
||||||
'procurement_contract_id' => $params['procurement_contract_id'],
|
'procurement_contract_id' => $params['procurement_contract_id'],
|
||||||
'material_procurement_application_id' => $item['material_procurement_application_id'] ?: 0,
|
'material_procurement_application_id' => $item['material_procurement_application_id'] ?? 0,
|
||||||
'num' => $item['num'] ?: 0,
|
'num' => $item['num'] ?? 0,
|
||||||
'unit_price_including_tax' => $item['unit_price_including_tax'] ?: 0,
|
'unit_price_including_tax' => $item['unit_price_including_tax'] ?? 0,
|
||||||
'tax_rate' => $item['tax_rate'] ?: 0,
|
'tax_rate' => $item['tax_rate'] ?? 0,
|
||||||
'amount_excluding_tax' => $item['amount_excluding_tax'] ?: 0,
|
'amount_excluding_tax' => $item['amount_excluding_tax'] ?? 0,
|
||||||
'amount_including_tax' => $item['amount_including_tax'] ?: 0,
|
'amount_including_tax' => $item['amount_including_tax'] ?? 0,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
Db::commit();
|
Db::commit();
|
||||||
@ -98,37 +98,37 @@ class ProcurementContractChangeLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
ProcurementContractChange::where('id', $params['id'])->update([
|
ProcurementContractChange::where('id', $params['id'])->update([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'procurement_contract_id' => $params['procurement_contract_id'] ?: 0,
|
'procurement_contract_id' => $params['procurement_contract_id'] ?? 0,
|
||||||
'supplier_id' => $params['supplier_id'] ?: 0,
|
'supplier_id' => $params['supplier_id'] ?? 0,
|
||||||
'approve_id' => $params['approve_id'] ?: 0,
|
'approve_id' => $params['approve_id'] ?? 0,
|
||||||
'contract_no' => $params['contract_no'] ?? '',
|
'contract_no' => $params['contract_no'] ?? '',
|
||||||
'supplier_contract_no' => $params['supplier_contract_no'] ?? '',
|
'supplier_contract_no' => $params['supplier_contract_no'] ?? '',
|
||||||
'contract_type' => $params['contract_type'] ?: 0,
|
'contract_type' => $params['contract_type'] ?? 0,
|
||||||
'signing_date' => strtotime($params['signing_date']),
|
'signing_date' => strtotime($params['signing_date']),
|
||||||
'pay_type' => $params['pay_type'] ?: 0,
|
'pay_type' => $params['pay_type'] ?? 0,
|
||||||
'account_period' => $params['account_period'] ?: 0,
|
'account_period' => $params['account_period'] ?? 0,
|
||||||
'amount' => $params['amount'] ?: 0,
|
'amount' => $params['amount'] ?? 0,
|
||||||
'amount_excluding_tax' => $params['amount_excluding_tax'] ?: 0,
|
'amount_excluding_tax' => $params['amount_excluding_tax'] ?? 0,
|
||||||
'amount_daxie' => $params['amount_daxie'] ?? '',
|
'amount_daxie' => $params['amount_daxie'] ?? '',
|
||||||
'retention_money_rate' => $params['retention_money_rate'] ?: 0,
|
'retention_money_rate' => $params['retention_money_rate'] ?? 0,
|
||||||
'retention_money' => $params['retention_money'] ?: 0,
|
'retention_money' => $params['retention_money'] ?? 0,
|
||||||
'pay_plan' => empty($params['pay_plan']) ? [] : json_encode($params['pay_plan']),
|
'pay_plan' => empty($params['pay_plan']) ? [] : json_encode($params['pay_plan']),
|
||||||
'remark' => $params['remark'] ?: 0,
|
'remark' => $params['remark'] ?? 0,
|
||||||
'annex' => $params['annex'] ?: 0,
|
'annex' => $params['annex'] ?? 0,
|
||||||
]);
|
]);
|
||||||
ProcurementContractDetail::where('procurement_contract_id', $params['procurement_contract_id'])->update(['delete_time' =>time()]);
|
ProcurementContractDetail::where('procurement_contract_id', $params['procurement_contract_id'])->update(['delete_time' =>time()]);
|
||||||
foreach ($params['material'] ?? [] as $item)
|
foreach ($params['material'] ?? [] as $item)
|
||||||
{
|
{
|
||||||
ProcurementContractDetail::create([
|
ProcurementContractDetail::create([
|
||||||
'procurement_contract_id' =>$params['procurement_contract_id'],
|
'procurement_contract_id' =>$params['procurement_contract_id'],
|
||||||
'material_procurement_application_id' => $item['material_procurement_application_id'] ?: 0,
|
'material_procurement_application_id' => $item['material_procurement_application_id'] ?? 0,
|
||||||
'num' => $item['num'] ?: 0,
|
'num' => $item['num'] ?? 0,
|
||||||
'unit_price_including_tax' => $item['unit_price_including_tax'] ?: 0,
|
'unit_price_including_tax' => $item['unit_price_including_tax'] ?? 0,
|
||||||
'tax_rate' => $item['tax_rate'] ?: 0,
|
'tax_rate' => $item['tax_rate'] ?? 0,
|
||||||
'amount_excluding_tax' => $item['amount_excluding_tax'] ?: 0,
|
'amount_excluding_tax' => $item['amount_excluding_tax'] ?? 0,
|
||||||
'amount_including_tax' => $item['amount_including_tax'] ?: 0,
|
'amount_including_tax' => $item['amount_including_tax'] ?? 0,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
Db::commit();
|
Db::commit();
|
||||||
|
@ -51,7 +51,7 @@ class SubcontractingContractNegotiationLogic extends BaseLogic
|
|||||||
'negotiation_no' => data_unique_code('QS-FBHT'),
|
'negotiation_no' => data_unique_code('QS-FBHT'),
|
||||||
'negotiation_amount' => $params['negotiation_amount'],
|
'negotiation_amount' => $params['negotiation_amount'],
|
||||||
'negotiation_type' => $params['negotiation_type'],
|
'negotiation_type' => $params['negotiation_type'],
|
||||||
'warranty_amount' => $params['warranty_amount'] ?: 0,
|
'warranty_amount' => $params['warranty_amount'] ?? 0,
|
||||||
'warranty_expire_date' => !empty($params['Warranty_expire_date']) ? strtotime($params['Warranty_expire_date']) : 0,
|
'warranty_expire_date' => !empty($params['Warranty_expire_date']) ? strtotime($params['Warranty_expire_date']) : 0,
|
||||||
'negotiation_content' => $params['negotiation_content'] ?? '',
|
'negotiation_content' => $params['negotiation_content'] ?? '',
|
||||||
'negotiation_detail' => $params['negotiation_detail'] ?? '',
|
'negotiation_detail' => $params['negotiation_detail'] ?? '',
|
||||||
@ -87,7 +87,7 @@ class SubcontractingContractNegotiationLogic extends BaseLogic
|
|||||||
'negotiation_name' => $params['negotiation_name'],
|
'negotiation_name' => $params['negotiation_name'],
|
||||||
'negotiation_amount' => $params['negotiation_amount'],
|
'negotiation_amount' => $params['negotiation_amount'],
|
||||||
'negotiation_type' => $params['negotiation_type'],
|
'negotiation_type' => $params['negotiation_type'],
|
||||||
'warranty_amount' => $params['warranty_amount'] ?: 0,
|
'warranty_amount' => $params['warranty_amount'] ?? 0,
|
||||||
'warranty_expire_date' => !empty($params['Warranty_expire_date']) ? strtotime($params['Warranty_expire_date']) : 0,
|
'warranty_expire_date' => !empty($params['Warranty_expire_date']) ? strtotime($params['Warranty_expire_date']) : 0,
|
||||||
'negotiation_content' => $params['negotiation_content'] ?? '',
|
'negotiation_content' => $params['negotiation_content'] ?? '',
|
||||||
'negotiation_detail' => $params['negotiation_detail'] ?? '',
|
'negotiation_detail' => $params['negotiation_detail'] ?? '',
|
||||||
|
@ -52,20 +52,20 @@ class CostBudgetAdjustLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
CostBudgetAdjustDetail::create([
|
CostBudgetAdjustDetail::create([
|
||||||
'cost_budget_adjust_id' => $costBudgetAdjust->id,
|
'cost_budget_adjust_id' => $costBudgetAdjust->id,
|
||||||
'cost_subject_id' => $item['cost_subject_id'] ?: 0,
|
'cost_subject_id' => $item['cost_subject_id'] ?? 0,
|
||||||
'dept_id' => $item['dept_id'] ?: 0,
|
'dept_id' => $item['dept_id'] ?? 0,
|
||||||
'month1' => $item['month1'] ?: 0,
|
'month1' => $item['month1'] ?? 0,
|
||||||
'month2' => $item['month2'] ?: 0,
|
'month2' => $item['month2'] ?? 0,
|
||||||
'month3' => $item['month3'] ?: 0,
|
'month3' => $item['month3'] ?? 0,
|
||||||
'month4' => $item['month4'] ?: 0,
|
'month4' => $item['month4'] ?? 0,
|
||||||
'month5' => $item['month5'] ?: 0,
|
'month5' => $item['month5'] ?? 0,
|
||||||
'month6' => $item['month6'] ?: 0,
|
'month6' => $item['month6'] ?? 0,
|
||||||
'month7' => $item['month7'] ?: 0,
|
'month7' => $item['month7'] ?? 0,
|
||||||
'month8' => $item['month8'] ?: 0,
|
'month8' => $item['month8'] ?? 0,
|
||||||
'month9' => $item['month9'] ?: 0,
|
'month9' => $item['month9'] ?? 0,
|
||||||
'month10' => $item['month10'] ?: 0,
|
'month10' => $item['month10'] ?? 0,
|
||||||
'month11' => $item['month11'] ?: 0,
|
'month11' => $item['month11'] ?? 0,
|
||||||
'month12' => $item['month12'] ?: 0
|
'month12' => $item['month12'] ?? 0
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,20 +102,20 @@ class CostBudgetAdjustLogic extends BaseLogic
|
|||||||
foreach ($params['detail'] ?? [] as $item)
|
foreach ($params['detail'] ?? [] as $item)
|
||||||
{
|
{
|
||||||
CostBudgetAdjustDetail::where('cost_budget_adjust_id', $params['id'])->update([
|
CostBudgetAdjustDetail::where('cost_budget_adjust_id', $params['id'])->update([
|
||||||
'cost_subject_id' => $item['cost_subject_id'] ?: 0,
|
'cost_subject_id' => $item['cost_subject_id'] ?? 0,
|
||||||
'dept_id' => $item['dept_id'] ?: 0,
|
'dept_id' => $item['dept_id'] ?? 0,
|
||||||
'month1' => $item['month1'] ?: 0,
|
'month1' => $item['month1'] ?? 0,
|
||||||
'month2' => $item['month2'] ?: 0,
|
'month2' => $item['month2'] ?? 0,
|
||||||
'month3' => $item['month3'] ?: 0,
|
'month3' => $item['month3'] ?? 0,
|
||||||
'month4' => $item['month4'] ?: 0,
|
'month4' => $item['month4'] ?? 0,
|
||||||
'month5' => $item['month5'] ?: 0,
|
'month5' => $item['month5'] ?? 0,
|
||||||
'month6' => $item['month6'] ?: 0,
|
'month6' => $item['month6'] ?? 0,
|
||||||
'month7' => $item['month7'] ?: 0,
|
'month7' => $item['month7'] ?? 0,
|
||||||
'month8' => $item['month8'] ?: 0,
|
'month8' => $item['month8'] ?? 0,
|
||||||
'month9' => $item['month9'] ?: 0,
|
'month9' => $item['month9'] ?? 0,
|
||||||
'month10' => $item['month10'] ?: 0,
|
'month10' => $item['month10'] ?? 0,
|
||||||
'month11' => $item['month11'] ?: 0,
|
'month11' => $item['month11'] ?? 0,
|
||||||
'month12' => $item['month12'] ?: 0
|
'month12' => $item['month12'] ?? 0
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
Db::commit();
|
Db::commit();
|
||||||
|
@ -42,10 +42,10 @@ class CostBudgetLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
$costBudget = CostBudget::create([
|
$costBudget = CostBudget::create([
|
||||||
'approve_id' => $params['approve_id'] ?: 0,
|
'approve_id' => $params['approve_id'] ?? 0,
|
||||||
'years' => $params['years'] ?? '',
|
'years' => $params['years'] ?? '',
|
||||||
'document_preparation_time' => $params['document_preparation_time'] ?? '',
|
'document_preparation_time' => $params['document_preparation_time'] ?? '',
|
||||||
'total' => $params['total'] ?: 0,
|
'total' => $params['total'] ?? 0,
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex'] ?? '',
|
'annex' => $params['annex'] ?? '',
|
||||||
]);
|
]);
|
||||||
@ -53,20 +53,20 @@ class CostBudgetLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
CostBudgetDetail::create([
|
CostBudgetDetail::create([
|
||||||
'cost_budget_id' => $costBudget->id,
|
'cost_budget_id' => $costBudget->id,
|
||||||
'cost_subject_id' => $item['cost_subject_id'] ?: 0,
|
'cost_subject_id' => $item['cost_subject_id'] ?? 0,
|
||||||
'dept_id' => $item['dept_id'] ?: 0,
|
'dept_id' => $item['dept_id'] ?? 0,
|
||||||
'month1' => $item['month1'] ?: 0,
|
'month1' => $item['month1'] ?? 0,
|
||||||
'month2' => $item['month2'] ?: 0,
|
'month2' => $item['month2'] ?? 0,
|
||||||
'month3' => $item['month3'] ?: 0,
|
'month3' => $item['month3'] ?? 0,
|
||||||
'month4' => $item['month4'] ?: 0,
|
'month4' => $item['month4'] ?? 0,
|
||||||
'month5' => $item['month5'] ?: 0,
|
'month5' => $item['month5'] ?? 0,
|
||||||
'month6' => $item['month6'] ?: 0,
|
'month6' => $item['month6'] ?? 0,
|
||||||
'month7' => $item['month7'] ?: 0,
|
'month7' => $item['month7'] ?? 0,
|
||||||
'month8' => $item['month8'] ?: 0,
|
'month8' => $item['month8'] ?? 0,
|
||||||
'month9' => $item['month9'] ?: 0,
|
'month9' => $item['month9'] ?? 0,
|
||||||
'month10' => $item['month10'] ?: 0,
|
'month10' => $item['month10'] ?? 0,
|
||||||
'month11' => $item['month11'] ?: 0,
|
'month11' => $item['month11'] ?? 0,
|
||||||
'month12' => $item['month12'] ?: 0
|
'month12' => $item['month12'] ?? 0
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,10 +92,10 @@ class CostBudgetLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
CostBudget::where('id', $params['id'])->update([
|
CostBudget::where('id', $params['id'])->update([
|
||||||
'approve_id' => $params['approve_id'] ?: 0,
|
'approve_id' => $params['approve_id'] ?? 0,
|
||||||
'years' => $params['years'] ?? '',
|
'years' => $params['years'] ?? '',
|
||||||
'document_preparation_time' => $params['document_preparation_time'] ?? '',
|
'document_preparation_time' => $params['document_preparation_time'] ?? '',
|
||||||
'total' => $params['total'] ?: 0,
|
'total' => $params['total'] ?? 0,
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex'] ?? '',
|
'annex' => $params['annex'] ?? '',
|
||||||
]);
|
]);
|
||||||
@ -103,20 +103,20 @@ class CostBudgetLogic extends BaseLogic
|
|||||||
foreach ($params['detail'] ?? [] as $item)
|
foreach ($params['detail'] ?? [] as $item)
|
||||||
{
|
{
|
||||||
CostBudgetDetail::where('cost_budget_id', $params['id'])->update([
|
CostBudgetDetail::where('cost_budget_id', $params['id'])->update([
|
||||||
'cost_subject_id' => $item['cost_subject_id'] ?: 0,
|
'cost_subject_id' => $item['cost_subject_id'] ?? 0,
|
||||||
'dept_id' => $item['dept_id'] ?: 0,
|
'dept_id' => $item['dept_id'] ?? 0,
|
||||||
'month1' => $item['month1'] ?: 0,
|
'month1' => $item['month1'] ?? 0,
|
||||||
'month2' => $item['month2'] ?: 0,
|
'month2' => $item['month2'] ?? 0,
|
||||||
'month3' => $item['month3'] ?: 0,
|
'month3' => $item['month3'] ?? 0,
|
||||||
'month4' => $item['month4'] ?: 0,
|
'month4' => $item['month4'] ?? 0,
|
||||||
'month5' => $item['month5'] ?: 0,
|
'month5' => $item['month5'] ?? 0,
|
||||||
'month6' => $item['month6'] ?: 0,
|
'month6' => $item['month6'] ?? 0,
|
||||||
'month7' => $item['month7'] ?: 0,
|
'month7' => $item['month7'] ?? 0,
|
||||||
'month8' => $item['month8'] ?: 0,
|
'month8' => $item['month8'] ?? 0,
|
||||||
'month9' => $item['month9'] ?: 0,
|
'month9' => $item['month9'] ?? 0,
|
||||||
'month10' => $item['month10'] ?: 0,
|
'month10' => $item['month10'] ?? 0,
|
||||||
'month11' => $item['month11'] ?: 0,
|
'month11' => $item['month11'] ?? 0,
|
||||||
'month12' => $item['month12'] ?: 0
|
'month12' => $item['month12'] ?? 0
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,9 +53,9 @@ class CustomLogic extends BaseLogic
|
|||||||
'custom_type' => $params['custom_type'],
|
'custom_type' => $params['custom_type'],
|
||||||
'phone' => $params['phone'],
|
'phone' => $params['phone'],
|
||||||
'credit_rating' => $params['credit_rating'],
|
'credit_rating' => $params['credit_rating'],
|
||||||
'province' => $params['province'] ?: 0,
|
'province' => $params['province'] ?? 0,
|
||||||
'city' => $params['city'] ?: 0,
|
'city' => $params['city'] ?? 0,
|
||||||
'area' => $params['area'] ?: 0,
|
'area' => $params['area'] ?? 0,
|
||||||
'address' => $params['address'] ?? '',
|
'address' => $params['address'] ?? '',
|
||||||
'notes' => $params['notes'] ?? '',
|
'notes' => $params['notes'] ?? '',
|
||||||
'master_name' => $params['master_name'],
|
'master_name' => $params['master_name'],
|
||||||
@ -114,9 +114,9 @@ class CustomLogic extends BaseLogic
|
|||||||
'custom_type' => $params['custom_type'],
|
'custom_type' => $params['custom_type'],
|
||||||
'phone' => $params['phone'],
|
'phone' => $params['phone'],
|
||||||
'credit_rating' => $params['credit_rating'],
|
'credit_rating' => $params['credit_rating'],
|
||||||
'province' => $params['province'] ?: 0,
|
'province' => $params['province'] ?? 0,
|
||||||
'city' => $params['city'] ?: 0,
|
'city' => $params['city'] ?? 0,
|
||||||
'area' => $params['area'] ?: 0,
|
'area' => $params['area'] ?? 0,
|
||||||
'address' => $params['address'] ?? '',
|
'address' => $params['address'] ?? '',
|
||||||
'notes' => $params['notes'] ?? '',
|
'notes' => $params['notes'] ?? '',
|
||||||
'master_name' => $params['master_name'] ?? '',
|
'master_name' => $params['master_name'] ?? '',
|
||||||
|
@ -44,7 +44,7 @@ class DeptLogic extends BaseLogic
|
|||||||
'leader' => $params['leader'],
|
'leader' => $params['leader'],
|
||||||
'mobile' => $params['mobile'],
|
'mobile' => $params['mobile'],
|
||||||
'status' => $params['status'],
|
'status' => $params['status'],
|
||||||
'sort' => $params['sort'] ?: 0
|
'sort' => $params['sort'] ?? 0
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ class DeptLogic extends BaseLogic
|
|||||||
'leader' => $params['leader'],
|
'leader' => $params['leader'],
|
||||||
'mobile' => $params['mobile'],
|
'mobile' => $params['mobile'],
|
||||||
'status' => $params['status'],
|
'status' => $params['status'],
|
||||||
'sort' => $params['sort'] ?: 0
|
'sort' => $params['sort'] ?? 0
|
||||||
]);
|
]);
|
||||||
return true;
|
return true;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
@ -43,7 +43,7 @@ class JobsLogic extends BaseLogic
|
|||||||
Jobs::create([
|
Jobs::create([
|
||||||
'dept_id' => $params['dept_id'],
|
'dept_id' => $params['dept_id'],
|
||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'sort' => $params['sort'] ?: 0,
|
'sort' => $params['sort'] ?? 0,
|
||||||
'status' => $params['status'],
|
'status' => $params['status'],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ class JobsLogic extends BaseLogic
|
|||||||
'id' => $params['id'],
|
'id' => $params['id'],
|
||||||
'dept_id' => $params['dept_id'],
|
'dept_id' => $params['dept_id'],
|
||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'sort' => $params['sort'] ?: 0,
|
'sort' => $params['sort'] ?? 0,
|
||||||
'status' => $params['status'],
|
'status' => $params['status'],
|
||||||
]);
|
]);
|
||||||
return true;
|
return true;
|
||||||
|
@ -43,14 +43,14 @@ class ExpenseReimbursementLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
$expenseReimbursement = ExpenseReimbursement::create([
|
$expenseReimbursement = ExpenseReimbursement::create([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'approve_id' => $params['approve_id'] ?: 0,
|
'approve_id' => $params['approve_id'] ?? 0,
|
||||||
'reimburser' => $params['reimburser'] ?? '',
|
'reimburser' => $params['reimburser'] ?? '',
|
||||||
'reimbursement_date' => $params['reimbursement_date'] ?? '',
|
'reimbursement_date' => $params['reimbursement_date'] ?? '',
|
||||||
'customer_id' => $params['customer_id'] ?: 0,
|
'customer_id' => $params['customer_id'] ?? 0,
|
||||||
'pay_type' => $params['pay_type'] ?: 0,
|
'pay_type' => $params['pay_type'] ?? 0,
|
||||||
'reimbursement_amount' => $params['reimbursement_amount'] ?: 0,
|
'reimbursement_amount' => $params['reimbursement_amount'] ?? 0,
|
||||||
'reimbursement_amount_daxie' => $params['reimbursement_amount_daxie'] ?? '',
|
'reimbursement_amount_daxie' => $params['reimbursement_amount_daxie'] ?? '',
|
||||||
'payee_name' => $params['payee_name'] ?? '',
|
'payee_name' => $params['payee_name'] ?? '',
|
||||||
'payee_bank' => $params['payee_bank'] ?? '',
|
'payee_bank' => $params['payee_bank'] ?? '',
|
||||||
@ -63,9 +63,9 @@ class ExpenseReimbursementLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
ExpenseReimbursementDetail::create([
|
ExpenseReimbursementDetail::create([
|
||||||
'expense_id' => $expenseReimbursement->id,
|
'expense_id' => $expenseReimbursement->id,
|
||||||
'cost_subject_id' => $item['cost_subject_id'] ?: 0,
|
'cost_subject_id' => $item['cost_subject_id'] ?? 0,
|
||||||
'use_to' => $item['use_to'] ?? '',
|
'use_to' => $item['use_to'] ?? '',
|
||||||
'amount' => $item['amount'] ?: 0,
|
'amount' => $item['amount'] ?? 0,
|
||||||
'remark' => $item['remark'] ?? ''
|
'remark' => $item['remark'] ?? ''
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -74,12 +74,12 @@ class ExpenseReimbursementLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
ExpenseReimbursementInvoiceDetail::create([
|
ExpenseReimbursementInvoiceDetail::create([
|
||||||
'expense_id' => $expenseReimbursement->id,
|
'expense_id' => $expenseReimbursement->id,
|
||||||
'invoice_type' => $item['invoice_type'] ?: 0,
|
'invoice_type' => $item['invoice_type'] ?? 0,
|
||||||
'invoice_sn' => $item['invoice_sn'] ?? '',
|
'invoice_sn' => $item['invoice_sn'] ?? '',
|
||||||
'tax_rate' => $item['tax_rate'] ?: 0,
|
'tax_rate' => $item['tax_rate'] ?? 0,
|
||||||
'invoice_form' => $item['invoice_form'] ?: 0,
|
'invoice_form' => $item['invoice_form'] ?? 0,
|
||||||
'amount' => $item['amount'] ?: 0,
|
'amount' => $item['amount'] ?? 0,
|
||||||
'tax' => $item['tax'] ?: 0,
|
'tax' => $item['tax'] ?? 0,
|
||||||
'annex' => $item['annex'] ?? '',
|
'annex' => $item['annex'] ?? '',
|
||||||
'remark' => $item['remark'] ?? ''
|
'remark' => $item['remark'] ?? ''
|
||||||
]);
|
]);
|
||||||
@ -107,14 +107,14 @@ class ExpenseReimbursementLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
ExpenseReimbursement::where('id', $params['id'])->update([
|
ExpenseReimbursement::where('id', $params['id'])->update([
|
||||||
'org_id' => $params['org_id'] ?: 0,
|
'org_id' => $params['org_id'] ?? 0,
|
||||||
'dept_id' => $params['dept_id'] ?: 0,
|
'dept_id' => $params['dept_id'] ?? 0,
|
||||||
'approve_id' => $params['approve_id'] ?: 0,
|
'approve_id' => $params['approve_id'] ?? 0,
|
||||||
'reimburser' => $params['reimburser'] ?? '',
|
'reimburser' => $params['reimburser'] ?? '',
|
||||||
'reimbursement_date' => $params['reimbursement_date'] ?? '',
|
'reimbursement_date' => $params['reimbursement_date'] ?? '',
|
||||||
'customer_id' => $params['customer_id'] ?: 0,
|
'customer_id' => $params['customer_id'] ?? 0,
|
||||||
'pay_type' => $params['pay_type'] ?: 0,
|
'pay_type' => $params['pay_type'] ?? 0,
|
||||||
'reimbursement_amount' => $params['reimbursement_amount'] ?: 0,
|
'reimbursement_amount' => $params['reimbursement_amount'] ?? 0,
|
||||||
'reimbursement_amount_daxie' => $params['reimbursement_amount_daxie'] ?? '',
|
'reimbursement_amount_daxie' => $params['reimbursement_amount_daxie'] ?? '',
|
||||||
'payee_name' => $params['payee_name'] ?? '',
|
'payee_name' => $params['payee_name'] ?? '',
|
||||||
'payee_bank' => $params['payee_bank'] ?? '',
|
'payee_bank' => $params['payee_bank'] ?? '',
|
||||||
@ -128,9 +128,9 @@ class ExpenseReimbursementLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
ExpenseReimbursementDetail::where('expense_id', $params['id'])->update([
|
ExpenseReimbursementDetail::where('expense_id', $params['id'])->update([
|
||||||
'expense_id' => $expenseReimbursement->id,
|
'expense_id' => $expenseReimbursement->id,
|
||||||
'cost_subject_id' => $item['cost_subject_id'] ?: 0,
|
'cost_subject_id' => $item['cost_subject_id'] ?? 0,
|
||||||
'use_to' => $item['use_to'] ?? '',
|
'use_to' => $item['use_to'] ?? '',
|
||||||
'amount' => $item['amount'] ?: 0,
|
'amount' => $item['amount'] ?? 0,
|
||||||
'remark' => $item['remark'] ?? ''
|
'remark' => $item['remark'] ?? ''
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -139,12 +139,12 @@ class ExpenseReimbursementLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
ExpenseReimbursementInvoiceDetail::where('expense_id', $params['id'])->update([
|
ExpenseReimbursementInvoiceDetail::where('expense_id', $params['id'])->update([
|
||||||
'expense_id' => $expenseReimbursement->id,
|
'expense_id' => $expenseReimbursement->id,
|
||||||
'invoice_type' => $item['invoice_type'] ?: 0,
|
'invoice_type' => $item['invoice_type'] ?? 0,
|
||||||
'invoice_sn' => $item['invoice_sn'] ?? '',
|
'invoice_sn' => $item['invoice_sn'] ?? '',
|
||||||
'tax_rate' => $item['tax_rate'] ?: 0,
|
'tax_rate' => $item['tax_rate'] ?? 0,
|
||||||
'invoice_form' => $item['invoice_form'] ?: 0,
|
'invoice_form' => $item['invoice_form'] ?? 0,
|
||||||
'amount' => $item['amount'] ?: 0,
|
'amount' => $item['amount'] ?? 0,
|
||||||
'tax' => $item['tax'] ?: 0,
|
'tax' => $item['tax'] ?? 0,
|
||||||
'annex' => $item['annex'] ?? '',
|
'annex' => $item['annex'] ?? '',
|
||||||
'remark' => $item['remark'] ?? ''
|
'remark' => $item['remark'] ?? ''
|
||||||
]);
|
]);
|
||||||
|
@ -44,17 +44,17 @@ class MaterialLogic extends BaseLogic
|
|||||||
try {
|
try {
|
||||||
Material::create([
|
Material::create([
|
||||||
'first_level' => $params['first_level'],
|
'first_level' => $params['first_level'],
|
||||||
'second_level' => $params['second_level'] ?: 0,
|
'second_level' => $params['second_level'] ?? 0,
|
||||||
'three_level' => $params['three_level'] ?: 0,
|
'three_level' => $params['three_level'] ?? 0,
|
||||||
'code' => $params['code'],
|
'code' => $params['code'],
|
||||||
'brand' => $params['brand'] ?? '',
|
'brand' => $params['brand'] ?? '',
|
||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'specs' => $params['specs'],
|
'specs' => $params['specs'],
|
||||||
'unit' => $params['unit'],
|
'unit' => $params['unit'],
|
||||||
'parameter_description' => $params['parameter_description'] ?? '',
|
'parameter_description' => $params['parameter_description'] ?? '',
|
||||||
'inventory' => $params['inventory'] ?: 0,
|
'inventory' => $params['inventory'] ?? 0,
|
||||||
'sales_price' => $params['sales_price'] ?: 0,
|
'sales_price' => $params['sales_price'] ?? 0,
|
||||||
'cost_price' => $params['cost_price'] ?: 0,
|
'cost_price' => $params['cost_price'] ?? 0,
|
||||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
'add_user' => $admin_id,
|
'add_user' => $admin_id,
|
||||||
'update_user' => $admin_id,
|
'update_user' => $admin_id,
|
||||||
@ -82,17 +82,17 @@ class MaterialLogic extends BaseLogic
|
|||||||
try {
|
try {
|
||||||
Material::where('id', $params['id'])->update([
|
Material::where('id', $params['id'])->update([
|
||||||
'first_level' => $params['first_level'],
|
'first_level' => $params['first_level'],
|
||||||
'second_level' => $params['second_level'] ?: 0,
|
'second_level' => $params['second_level'] ?? 0,
|
||||||
'three_level' => $params['three_level'] ?: 0,
|
'three_level' => $params['three_level'] ?? 0,
|
||||||
'code' => $params['code'],
|
'code' => $params['code'],
|
||||||
'brand' => $params['brand'] ?? '',
|
'brand' => $params['brand'] ?? '',
|
||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'specs' => $params['specs'],
|
'specs' => $params['specs'],
|
||||||
'unit' => $params['unit'],
|
'unit' => $params['unit'],
|
||||||
'parameter_description' => $params['parameter_description'] ?? '',
|
'parameter_description' => $params['parameter_description'] ?? '',
|
||||||
'inventory' => $params['inventory'] ?: 0,
|
'inventory' => $params['inventory'] ?? 0,
|
||||||
'sales_price' => $params['sales_price'] ?: 0,
|
'sales_price' => $params['sales_price'] ?? 0,
|
||||||
'cost_price' => $params['cost_price'] ?: 0,
|
'cost_price' => $params['cost_price'] ?? 0,
|
||||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
'update_user' => $admin_id,
|
'update_user' => $admin_id,
|
||||||
'update_time' => time()
|
'update_time' => time()
|
||||||
|
@ -124,7 +124,7 @@ class NoticeLogic extends BaseLogic
|
|||||||
*/
|
*/
|
||||||
public static function checkSet($params)
|
public static function checkSet($params)
|
||||||
{
|
{
|
||||||
$noticeSetting = NoticeSetting::findOrEmpty($params['id'] ?: 0);
|
$noticeSetting = NoticeSetting::findOrEmpty($params['id'] ?? 0);
|
||||||
|
|
||||||
if ($noticeSetting->isEmpty()) {
|
if ($noticeSetting->isEmpty()) {
|
||||||
throw new \Exception('通知配置不存在');
|
throw new \Exception('通知配置不存在');
|
||||||
|
@ -104,7 +104,7 @@ class SmsConfigLogic extends BaseLogic
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$result = ConfigService::get('sms', $params['type'], $default);
|
$result = ConfigService::get('sms', $params['type'], $default);
|
||||||
$result['status'] = intval($result['status'] ?: 0);
|
$result['status'] = intval($result['status'] ?? 0);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,9 +56,9 @@ class ProjectEstimateLogic extends BaseLogic
|
|||||||
'contact_id' => $params['contact_id'],
|
'contact_id' => $params['contact_id'],
|
||||||
'create_user' => $params['create_user'] ?? '',
|
'create_user' => $params['create_user'] ?? '',
|
||||||
'quotation_date' => strtotime($params['quotation_date']),
|
'quotation_date' => strtotime($params['quotation_date']),
|
||||||
'invoice_type' => $params['invoice_type'] ?: 0,
|
'invoice_type' => $params['invoice_type'] ?? 0,
|
||||||
'technician' => $params['technician'] ?: 0,
|
'technician' => $params['technician'] ?? 0,
|
||||||
'estimate_amount' => $params['estimate_amount'] ?: 0,
|
'estimate_amount' => $params['estimate_amount'] ?? 0,
|
||||||
'ask' => $params['ask'] ?? '',
|
'ask' => $params['ask'] ?? '',
|
||||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
'add_user' => $admin_id,
|
'add_user' => $admin_id,
|
||||||
@ -94,9 +94,9 @@ class ProjectEstimateLogic extends BaseLogic
|
|||||||
'contact_id' => $params['contact_id'],
|
'contact_id' => $params['contact_id'],
|
||||||
'create_user' => $params['create_user'] ?? '',
|
'create_user' => $params['create_user'] ?? '',
|
||||||
'quotation_date' => strtotime($params['quotation_date']),
|
'quotation_date' => strtotime($params['quotation_date']),
|
||||||
'invoice_type' => $params['invoice_type'] ?: 0,
|
'invoice_type' => $params['invoice_type'] ?? 0,
|
||||||
'technician' => $params['technician'] ?: 0,
|
'technician' => $params['technician'] ?? 0,
|
||||||
'estimate_amount' => $params['estimate_amount'] ?: 0,
|
'estimate_amount' => $params['estimate_amount'] ?? 0,
|
||||||
'ask' => $params['ask'] ?? '',
|
'ask' => $params['ask'] ?? '',
|
||||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
'update_user' => $admin_id,
|
'update_user' => $admin_id,
|
||||||
|
@ -54,8 +54,8 @@ class ProjectExpenseReimbursementLogic extends BaseLogic
|
|||||||
'apply_user' => $params['apply_user'],
|
'apply_user' => $params['apply_user'],
|
||||||
'apply_date' => strtotime($params['apply_date']),
|
'apply_date' => strtotime($params['apply_date']),
|
||||||
'reimbursement_type' => $params['reimbursement_type'],
|
'reimbursement_type' => $params['reimbursement_type'],
|
||||||
'loan_apply_id' => $params['loan_apply_id'] ?: 0,
|
'loan_apply_id' => $params['loan_apply_id'] ?? 0,
|
||||||
'offset_loan_amount' => $params['offset_loan_amount'] ?: 0,
|
'offset_loan_amount' => $params['offset_loan_amount'] ?? 0,
|
||||||
'payee_name' => $params['payee_name'],
|
'payee_name' => $params['payee_name'],
|
||||||
'payee_bank' => $params['payee_bank'],
|
'payee_bank' => $params['payee_bank'],
|
||||||
'payee_account' => $params['payee_account'],
|
'payee_account' => $params['payee_account'],
|
||||||
@ -112,8 +112,8 @@ class ProjectExpenseReimbursementLogic extends BaseLogic
|
|||||||
'apply_user' => $params['apply_user'],
|
'apply_user' => $params['apply_user'],
|
||||||
'apply_date' => strtotime($params['apply_date']),
|
'apply_date' => strtotime($params['apply_date']),
|
||||||
'reimbursement_type' => $params['reimbursement_type'],
|
'reimbursement_type' => $params['reimbursement_type'],
|
||||||
'loan_apply_id' => $params['loan_apply_id'] ?: 0,
|
'loan_apply_id' => $params['loan_apply_id'] ?? 0,
|
||||||
'offset_loan_amount' => $params['offset_loan_amount'] ?: 0,
|
'offset_loan_amount' => $params['offset_loan_amount'] ?? 0,
|
||||||
'payee_name' => $params['payee_name'],
|
'payee_name' => $params['payee_name'],
|
||||||
'payee_bank' => $params['payee_bank'],
|
'payee_bank' => $params['payee_bank'],
|
||||||
'payee_account' => $params['payee_account'],
|
'payee_account' => $params['payee_account'],
|
||||||
|
@ -51,29 +51,29 @@ class ProjectLogic extends BaseLogic
|
|||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'project_type' => $params['project_type'],
|
'project_type' => $params['project_type'],
|
||||||
'project_code' => data_unique_code('P'),
|
'project_code' => data_unique_code('P'),
|
||||||
'project_content' => $params['project_content'] ?: 0,
|
'project_content' => $params['project_content'] ?? 0,
|
||||||
'project_estimation' => $params['project_estimation'] ?: 0,
|
'project_estimation' => $params['project_estimation'] ?? 0,
|
||||||
'project_address' => $params['project_address'] ?? '',
|
'project_address' => $params['project_address'] ?? '',
|
||||||
'estimated_construction' => $params['estimated_construction'] ?? '',
|
'estimated_construction' => $params['estimated_construction'] ?? '',
|
||||||
'bidding_time' => !empty($params['bidding_time']) ? strtotime($params['bidding_time']) : 0,
|
'bidding_time' => !empty($params['bidding_time']) ? strtotime($params['bidding_time']) : 0,
|
||||||
'bidding_method' => $params['bidding_method'] ?: 0,
|
'bidding_method' => $params['bidding_method'] ?? 0,
|
||||||
'contacts' => $params['contacts'] ?? '',
|
'contacts' => $params['contacts'] ?? '',
|
||||||
'position' => $params['position'] ?? '',
|
'position' => $params['position'] ?? '',
|
||||||
'telephone' => $params['telephone'] ?? '',
|
'telephone' => $params['telephone'] ?? '',
|
||||||
'department' => $params['department'] ?? '',
|
'department' => $params['department'] ?? '',
|
||||||
'person' => $params['person'] ?? '',
|
'person' => $params['person'] ?? '',
|
||||||
'relationship' => $params['relationship'] ?: 0,
|
'relationship' => $params['relationship'] ?? 0,
|
||||||
'discovery_time' => strtotime($params['discovery_time']),
|
'discovery_time' => strtotime($params['discovery_time']),
|
||||||
'information_sources' => $params['information_sources'],
|
'information_sources' => $params['information_sources'],
|
||||||
'competitor' => $params['competitor'] ?? '',
|
'competitor' => $params['competitor'] ?? '',
|
||||||
'construction_funds_sources' => $params['construction_funds_sources'] ?: 0,
|
'construction_funds_sources' => $params['construction_funds_sources'] ?? 0,
|
||||||
'construction_payment_method' => $params['construction_payment_method'] ?? '',
|
'construction_payment_method' => $params['construction_payment_method'] ?? '',
|
||||||
'construction_financial_status' => $params['construction_financial_status'] ?: 0,
|
'construction_financial_status' => $params['construction_financial_status'] ?? 0,
|
||||||
'construction_recognition' => $params['construction_recognition'] ?: 0,
|
'construction_recognition' => $params['construction_recognition'] ?? 0,
|
||||||
'my_construction_recognition' => $params['my_construction_recognition'] ?: 0,
|
'my_construction_recognition' => $params['my_construction_recognition'] ?? 0,
|
||||||
'strategic_significance' => $params['strategic_significance'] ?: 0,
|
'strategic_significance' => $params['strategic_significance'] ?? 0,
|
||||||
'industry' => $params['industry'] ?: 0,
|
'industry' => $params['industry'] ?? 0,
|
||||||
'unit_nature' => $params['unit_nature'] ?: 0,
|
'unit_nature' => $params['unit_nature'] ?? 0,
|
||||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
'status' => 0,
|
'status' => 0,
|
||||||
'is_budget' => 0,
|
'is_budget' => 0,
|
||||||
@ -107,29 +107,29 @@ class ProjectLogic extends BaseLogic
|
|||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'project_type' => $params['project_type'],
|
'project_type' => $params['project_type'],
|
||||||
'project_code' => data_unique_code('P'),
|
'project_code' => data_unique_code('P'),
|
||||||
'project_content' => $params['project_content'] ?: 0,
|
'project_content' => $params['project_content'] ?? 0,
|
||||||
'project_estimation' => $params['project_estimation'] ?: 0,
|
'project_estimation' => $params['project_estimation'] ?? 0,
|
||||||
'project_address' => $params['project_address'] ?? '',
|
'project_address' => $params['project_address'] ?? '',
|
||||||
'estimated_construction' => $params['estimated_construction'] ?? '',
|
'estimated_construction' => $params['estimated_construction'] ?? '',
|
||||||
'bidding_time' => !empty($params['bidding_time']) ? strtotime($params['bidding_time']) : 0,
|
'bidding_time' => !empty($params['bidding_time']) ? strtotime($params['bidding_time']) : 0,
|
||||||
'bidding_method' => $params['bidding_method'] ?: 0,
|
'bidding_method' => $params['bidding_method'] ?? 0,
|
||||||
'contacts' => $params['contacts'] ?? '',
|
'contacts' => $params['contacts'] ?? '',
|
||||||
'position' => $params['position'] ?? '',
|
'position' => $params['position'] ?? '',
|
||||||
'telephone' => $params['telephone'] ?? '',
|
'telephone' => $params['telephone'] ?? '',
|
||||||
'department' => $params['department'] ?? '',
|
'department' => $params['department'] ?? '',
|
||||||
'person' => $params['person'] ?? '',
|
'person' => $params['person'] ?? '',
|
||||||
'relationship' => $params['relationship'] ?: 0,
|
'relationship' => $params['relationship'] ?? 0,
|
||||||
'discovery_time' => strtotime($params['discovery_time']),
|
'discovery_time' => strtotime($params['discovery_time']),
|
||||||
'information_sources' => $params['information_sources'],
|
'information_sources' => $params['information_sources'],
|
||||||
'competitor' => $params['competitor'] ?? '',
|
'competitor' => $params['competitor'] ?? '',
|
||||||
'construction_funds_sources' => $params['construction_funds_sources'] ?: 0,
|
'construction_funds_sources' => $params['construction_funds_sources'] ?? 0,
|
||||||
'construction_payment_method' => $params['construction_payment_method'] ?? '',
|
'construction_payment_method' => $params['construction_payment_method'] ?? '',
|
||||||
'construction_financial_status' => $params['construction_financial_status'] ?: 0,
|
'construction_financial_status' => $params['construction_financial_status'] ?? 0,
|
||||||
'construction_recognition' => $params['construction_recognition'] ?: 0,
|
'construction_recognition' => $params['construction_recognition'] ?? 0,
|
||||||
'my_construction_recognition' => $params['my_construction_recognition'] ?: 0,
|
'my_construction_recognition' => $params['my_construction_recognition'] ?? 0,
|
||||||
'strategic_significance' => $params['strategic_significance'] ?: 0,
|
'strategic_significance' => $params['strategic_significance'] ?? 0,
|
||||||
'industry' => $params['industry'] ?: 0,
|
'industry' => $params['industry'] ?? 0,
|
||||||
'unit_nature' => $params['unit_nature'] ?: 0,
|
'unit_nature' => $params['unit_nature'] ?? 0,
|
||||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
'update_time' => time(),
|
'update_time' => time(),
|
||||||
]);
|
]);
|
||||||
|
@ -49,11 +49,11 @@ class ProjectTotalBudgetLogic extends BaseLogic
|
|||||||
'project_id' => $params['project_id'],
|
'project_id' => $params['project_id'],
|
||||||
'total_budget_code' => data_unique_code('项目总预算'),
|
'total_budget_code' => data_unique_code('项目总预算'),
|
||||||
'contract_amount' => $params['contract_amount'],
|
'contract_amount' => $params['contract_amount'],
|
||||||
'cl_cost' => $params['cl_cost'] ?: 0,
|
'cl_cost' => $params['cl_cost'] ?? 0,
|
||||||
'fb_cost' => $params['fb_cost'] ?: 0,
|
'fb_cost' => $params['fb_cost'] ?? 0,
|
||||||
'rg_cost' => $params['rg_cost'] ?: 0,
|
'rg_cost' => $params['rg_cost'] ?? 0,
|
||||||
'fy_cost' => $params['fy_cost'] ?: 0,
|
'fy_cost' => $params['fy_cost'] ?? 0,
|
||||||
'jj_cost' => $params['jj_cost'] ?: 0,
|
'jj_cost' => $params['jj_cost'] ?? 0,
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'budget_list' => !empty($params['budget_list']) ? $params['budget_list'] : null,
|
'budget_list' => !empty($params['budget_list']) ? $params['budget_list'] : null,
|
||||||
'budget_date' => strtotime($params['budget_date']),
|
'budget_date' => strtotime($params['budget_date']),
|
||||||
@ -86,11 +86,11 @@ class ProjectTotalBudgetLogic extends BaseLogic
|
|||||||
try {
|
try {
|
||||||
ProjectTotalBudget::where('id', $params['id'])->update([
|
ProjectTotalBudget::where('id', $params['id'])->update([
|
||||||
'contract_amount' => $params['contract_amount'],
|
'contract_amount' => $params['contract_amount'],
|
||||||
'cl_cost' => $params['cl_cost'] ?: 0,
|
'cl_cost' => $params['cl_cost'] ?? 0,
|
||||||
'fb_cost' => $params['fb_cost'] ?: 0,
|
'fb_cost' => $params['fb_cost'] ?? 0,
|
||||||
'rg_cost' => $params['rg_cost'] ?: 0,
|
'rg_cost' => $params['rg_cost'] ?? 0,
|
||||||
'fy_cost' => $params['fy_cost'] ?: 0,
|
'fy_cost' => $params['fy_cost'] ?? 0,
|
||||||
'jj_cost' => $params['jj_cost'] ?: 0,
|
'jj_cost' => $params['jj_cost'] ?? 0,
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'budget_list' => !empty($params['budget_list']) ? $params['budget_list'] : null,
|
'budget_list' => !empty($params['budget_list']) ? $params['budget_list'] : null,
|
||||||
'budget_date' => strtotime($params['budget_date']),
|
'budget_date' => strtotime($params['budget_date']),
|
||||||
|
@ -45,11 +45,11 @@ class ProjectTravelReimbursementDetailLogic extends BaseLogic
|
|||||||
ProjectTravelReimbursementDetail::create([
|
ProjectTravelReimbursementDetail::create([
|
||||||
'travel_reimbursement_id' => $params['travel_reimbursement_id'],
|
'travel_reimbursement_id' => $params['travel_reimbursement_id'],
|
||||||
'project_cost_temp_id' => $params['project_cost_temp_id'],
|
'project_cost_temp_id' => $params['project_cost_temp_id'],
|
||||||
'traffic_fee' => $params['traffic_fee'] ?: 0,
|
'traffic_fee' => $params['traffic_fee'] ?? 0,
|
||||||
'stay_fee' => $params['stay_fee'] ?: 0,
|
'stay_fee' => $params['stay_fee'] ?? 0,
|
||||||
'restaurant_fee' => $params['restaurant_fee'] ?: 0,
|
'restaurant_fee' => $params['restaurant_fee'] ?? 0,
|
||||||
'subsidy_fee' => $params['subsidy_fee'] ?: 0,
|
'subsidy_fee' => $params['subsidy_fee'] ?? 0,
|
||||||
'other_fee' => $params['other_fee'] ?: 0,
|
'other_fee' => $params['other_fee'] ?? 0,
|
||||||
'total_amount' => $params['traffic_fee'] + $params['stay_fee'] + $params['restaurant_fee'] + $params['subsidy_fee'] + $params['other_fee'],
|
'total_amount' => $params['traffic_fee'] + $params['stay_fee'] + $params['restaurant_fee'] + $params['subsidy_fee'] + $params['other_fee'],
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
]);
|
]);
|
||||||
@ -77,11 +77,11 @@ class ProjectTravelReimbursementDetailLogic extends BaseLogic
|
|||||||
ProjectTravelReimbursementDetail::where('id', $params['id'])->update([
|
ProjectTravelReimbursementDetail::where('id', $params['id'])->update([
|
||||||
'travel_reimbursement_id' => $params['travel_reimbursement_id'],
|
'travel_reimbursement_id' => $params['travel_reimbursement_id'],
|
||||||
'project_cost_temp_id' => $params['project_cost_temp_id'],
|
'project_cost_temp_id' => $params['project_cost_temp_id'],
|
||||||
'traffic_fee' => $params['traffic_fee'] ?: 0,
|
'traffic_fee' => $params['traffic_fee'] ?? 0,
|
||||||
'stay_fee' => $params['stay_fee'] ?: 0,
|
'stay_fee' => $params['stay_fee'] ?? 0,
|
||||||
'restaurant_fee' => $params['restaurant_fee'] ?: 0,
|
'restaurant_fee' => $params['restaurant_fee'] ?? 0,
|
||||||
'subsidy_fee' => $params['subsidy_fee'] ?: 0,
|
'subsidy_fee' => $params['subsidy_fee'] ?? 0,
|
||||||
'other_fee' => $params['other_fee'] ?: 0,
|
'other_fee' => $params['other_fee'] ?? 0,
|
||||||
'total_amount' => $params['traffic_fee'] + $params['stay_fee'] + $params['restaurant_fee'] + $params['subsidy_fee'] + $params['other_fee'],
|
'total_amount' => $params['traffic_fee'] + $params['stay_fee'] + $params['restaurant_fee'] + $params['subsidy_fee'] + $params['other_fee'],
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'update_time' => time(),
|
'update_time' => time(),
|
||||||
|
@ -57,8 +57,8 @@ class ProjectTravelReimbursementLogic extends BaseLogic
|
|||||||
'trip_apply_id' => $params['trip_apply_id'],
|
'trip_apply_id' => $params['trip_apply_id'],
|
||||||
'project_id' => $trip_apply['project_id'],
|
'project_id' => $trip_apply['project_id'],
|
||||||
'reimbursement_type' => $params['reimbursement_type'],
|
'reimbursement_type' => $params['reimbursement_type'],
|
||||||
'loan_apply_id' => $params['loan_apply_id'] ?: 0,
|
'loan_apply_id' => $params['loan_apply_id'] ?? 0,
|
||||||
'offset_loan_amount' => $params['offset_loan_amount'] ?: 0,//冲抵借款金额
|
'offset_loan_amount' => $params['offset_loan_amount'] ?? 0,//冲抵借款金额
|
||||||
'apply_user' => $params['apply_user'],
|
'apply_user' => $params['apply_user'],
|
||||||
'apply_date' => strtotime($params['apply_date']),
|
'apply_date' => strtotime($params['apply_date']),
|
||||||
'payee_name' => $params['payee_name'],
|
'payee_name' => $params['payee_name'],
|
||||||
@ -72,11 +72,11 @@ class ProjectTravelReimbursementLogic extends BaseLogic
|
|||||||
ProjectTravelReimbursementDetail::create([
|
ProjectTravelReimbursementDetail::create([
|
||||||
'travel_reimbursement_id' => $res->id,
|
'travel_reimbursement_id' => $res->id,
|
||||||
'project_cost_temp_id' => $item['project_cost_temp_id'],
|
'project_cost_temp_id' => $item['project_cost_temp_id'],
|
||||||
'traffic_fee' => $item['traffic_fee'] ?: 0,
|
'traffic_fee' => $item['traffic_fee'] ?? 0,
|
||||||
'stay_fee' => $item['stay_fee'] ?: 0,
|
'stay_fee' => $item['stay_fee'] ?? 0,
|
||||||
'restaurant_fee' => $item['restaurant_fee'] ?: 0,
|
'restaurant_fee' => $item['restaurant_fee'] ?? 0,
|
||||||
'subsidy_fee' => $item['subsidy_fee'] ?: 0,
|
'subsidy_fee' => $item['subsidy_fee'] ?? 0,
|
||||||
'other_fee' => $item['other_fee'] ?: 0,
|
'other_fee' => $item['other_fee'] ?? 0,
|
||||||
'total_amount' => $item['traffic_fee'] + $item['stay_fee'] + $item['restaurant_fee'] + $item['subsidy_fee'] + $item['other_fee'],
|
'total_amount' => $item['traffic_fee'] + $item['stay_fee'] + $item['restaurant_fee'] + $item['subsidy_fee'] + $item['other_fee'],
|
||||||
'remark' => $item['remark'] ?? '',
|
'remark' => $item['remark'] ?? '',
|
||||||
]);
|
]);
|
||||||
@ -122,8 +122,8 @@ class ProjectTravelReimbursementLogic extends BaseLogic
|
|||||||
'trip_apply_id' => $params['trip_apply_id'],
|
'trip_apply_id' => $params['trip_apply_id'],
|
||||||
'project_id' => $trip_apply['project_id'],
|
'project_id' => $trip_apply['project_id'],
|
||||||
'reimbursement_type' => $params['reimbursement_type'],
|
'reimbursement_type' => $params['reimbursement_type'],
|
||||||
'loan_apply_id' => $params['loan_apply_id'] ?: 0,
|
'loan_apply_id' => $params['loan_apply_id'] ?? 0,
|
||||||
'offset_loan_amount' => $params['offset_loan_amount'] ?: 0,//冲抵借款金额
|
'offset_loan_amount' => $params['offset_loan_amount'] ?? 0,//冲抵借款金额
|
||||||
'apply_user' => $params['apply_user'],
|
'apply_user' => $params['apply_user'],
|
||||||
'apply_date' => strtotime($params['apply_date']),
|
'apply_date' => strtotime($params['apply_date']),
|
||||||
'payee_name' => $params['payee_name'],
|
'payee_name' => $params['payee_name'],
|
||||||
@ -139,11 +139,11 @@ class ProjectTravelReimbursementLogic extends BaseLogic
|
|||||||
ProjectTravelReimbursementDetail::where('id',$item['id'])->update([
|
ProjectTravelReimbursementDetail::where('id',$item['id'])->update([
|
||||||
'travel_reimbursement_id' => $params['id'],
|
'travel_reimbursement_id' => $params['id'],
|
||||||
'project_cost_temp_id' => $item['project_cost_temp_id'],
|
'project_cost_temp_id' => $item['project_cost_temp_id'],
|
||||||
'traffic_fee' => $item['traffic_fee'] ?: 0,
|
'traffic_fee' => $item['traffic_fee'] ?? 0,
|
||||||
'stay_fee' => $item['stay_fee'] ?: 0,
|
'stay_fee' => $item['stay_fee'] ?? 0,
|
||||||
'restaurant_fee' => $item['restaurant_fee'] ?: 0,
|
'restaurant_fee' => $item['restaurant_fee'] ?? 0,
|
||||||
'subsidy_fee' => $item['subsidy_fee'] ?: 0,
|
'subsidy_fee' => $item['subsidy_fee'] ?? 0,
|
||||||
'other_fee' => $item['other_fee'] ?: 0,
|
'other_fee' => $item['other_fee'] ?? 0,
|
||||||
'total_amount' => $item['traffic_fee'] + $item['stay_fee'] + $item['restaurant_fee'] + $item['subsidy_fee'] + $item['other_fee'],
|
'total_amount' => $item['traffic_fee'] + $item['stay_fee'] + $item['restaurant_fee'] + $item['subsidy_fee'] + $item['other_fee'],
|
||||||
'remark' => $item['remark'] ?? '',
|
'remark' => $item['remark'] ?? '',
|
||||||
'update_time' => time(),
|
'update_time' => time(),
|
||||||
@ -152,11 +152,11 @@ class ProjectTravelReimbursementLogic extends BaseLogic
|
|||||||
ProjectTravelReimbursementDetail::create([
|
ProjectTravelReimbursementDetail::create([
|
||||||
'travel_reimbursement_id' => $params['id'],
|
'travel_reimbursement_id' => $params['id'],
|
||||||
'project_cost_temp_id' => $item['project_cost_temp_id'],
|
'project_cost_temp_id' => $item['project_cost_temp_id'],
|
||||||
'traffic_fee' => $item['traffic_fee'] ?: 0,
|
'traffic_fee' => $item['traffic_fee'] ?? 0,
|
||||||
'stay_fee' => $item['stay_fee'] ?: 0,
|
'stay_fee' => $item['stay_fee'] ?? 0,
|
||||||
'restaurant_fee' => $item['restaurant_fee'] ?: 0,
|
'restaurant_fee' => $item['restaurant_fee'] ?? 0,
|
||||||
'subsidy_fee' => $item['subsidy_fee'] ?: 0,
|
'subsidy_fee' => $item['subsidy_fee'] ?? 0,
|
||||||
'other_fee' => $item['other_fee'] ?: 0,
|
'other_fee' => $item['other_fee'] ?? 0,
|
||||||
'total_amount' => $item['traffic_fee'] + $item['stay_fee'] + $item['restaurant_fee'] + $item['subsidy_fee'] + $item['other_fee'],
|
'total_amount' => $item['traffic_fee'] + $item['stay_fee'] + $item['restaurant_fee'] + $item['subsidy_fee'] + $item['other_fee'],
|
||||||
'remark' => $item['remark'] ?? '',
|
'remark' => $item['remark'] ?? '',
|
||||||
]);
|
]);
|
||||||
|
@ -58,7 +58,7 @@ class QuotationLogic extends BaseLogic
|
|||||||
'code' => data_unique_code('报价单'),
|
'code' => data_unique_code('报价单'),
|
||||||
'quotation_date' => !empty($params['quotation_date']) ? strtotime($params['quotation_date']) : 0,
|
'quotation_date' => !empty($params['quotation_date']) ? strtotime($params['quotation_date']) : 0,
|
||||||
'create_user' => $params['create_user'] ?? '',
|
'create_user' => $params['create_user'] ?? '',
|
||||||
'invoice_type' => $params['invoice_type'] ?: 0,
|
'invoice_type' => $params['invoice_type'] ?? 0,
|
||||||
'freight' => $params['freight'],
|
'freight' => $params['freight'],
|
||||||
'other_fee' => $params['other_fee'],
|
'other_fee' => $params['other_fee'],
|
||||||
'customer_require' => $params['customer_require'] ?? '',
|
'customer_require' => $params['customer_require'] ?? '',
|
||||||
|
@ -39,7 +39,7 @@ class DictDataLogic extends BaseLogic
|
|||||||
$data = [
|
$data = [
|
||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'value' => $params['value'],
|
'value' => $params['value'],
|
||||||
'sort' => $params['sort'] ?: 0,
|
'sort' => $params['sort'] ?? 0,
|
||||||
'status' => $params['status'],
|
'status' => $params['status'],
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
];
|
];
|
||||||
|
@ -44,12 +44,12 @@ class SupplierContactsLogic extends BaseLogic
|
|||||||
SupplierContacts::create([
|
SupplierContacts::create([
|
||||||
'supplier_id' => $params['supplier_id'],
|
'supplier_id' => $params['supplier_id'],
|
||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'sex' => $params['sex'] ?: 0,
|
'sex' => $params['sex'] ?? 0,
|
||||||
'birthday' => !empty($params['birthday']) ? strtotime($params['birthday']) : 0,
|
'birthday' => !empty($params['birthday']) ? strtotime($params['birthday']) : 0,
|
||||||
'contacts_type' => $params['contacts_type'] ?: 0,
|
'contacts_type' => $params['contacts_type'] ?? 0,
|
||||||
'responsible' => $params['responsible'] ?? '',
|
'responsible' => $params['responsible'] ?? '',
|
||||||
'title' => $params['title'] ?? '',
|
'title' => $params['title'] ?? '',
|
||||||
'contacts_cate' => $params['contacts_cate'] ?: 0,
|
'contacts_cate' => $params['contacts_cate'] ?? 0,
|
||||||
'department' => $params['department'] ?? '',
|
'department' => $params['department'] ?? '',
|
||||||
'duties' => $params['duties'] ?? '',
|
'duties' => $params['duties'] ?? '',
|
||||||
'work_phone' => $params['work_phone'] ?? '',
|
'work_phone' => $params['work_phone'] ?? '',
|
||||||
@ -58,7 +58,7 @@ class SupplierContactsLogic extends BaseLogic
|
|||||||
'fax' => $params['fax'] ?? '',
|
'fax' => $params['fax'] ?? '',
|
||||||
'zip_code' => $params['zip_code'] ?? '',
|
'zip_code' => $params['zip_code'] ?? '',
|
||||||
'family_address' => $params['family_address'] ?? '',
|
'family_address' => $params['family_address'] ?? '',
|
||||||
'id_type' => $params['id_type'] ?: 0,
|
'id_type' => $params['id_type'] ?? 0,
|
||||||
'idcard' => $params['idcard'] ?? '',
|
'idcard' => $params['idcard'] ?? '',
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
@ -87,12 +87,12 @@ class SupplierContactsLogic extends BaseLogic
|
|||||||
SupplierContacts::where('id', $params['id'])->update([
|
SupplierContacts::where('id', $params['id'])->update([
|
||||||
'supplier_id' => $params['supplier_id'],
|
'supplier_id' => $params['supplier_id'],
|
||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'sex' => $params['sex'] ?: 0,
|
'sex' => $params['sex'] ?? 0,
|
||||||
'birthday' => !empty($params['birthday']) ? strtotime($params['birthday']) : 0,
|
'birthday' => !empty($params['birthday']) ? strtotime($params['birthday']) : 0,
|
||||||
'contacts_type' => $params['contacts_type'] ?: 0,
|
'contacts_type' => $params['contacts_type'] ?? 0,
|
||||||
'responsible' => $params['responsible'] ?? '',
|
'responsible' => $params['responsible'] ?? '',
|
||||||
'title' => $params['title'] ?? '',
|
'title' => $params['title'] ?? '',
|
||||||
'contacts_cate' => $params['contacts_cate'] ?: 0,
|
'contacts_cate' => $params['contacts_cate'] ?? 0,
|
||||||
'department' => $params['department'] ?? '',
|
'department' => $params['department'] ?? '',
|
||||||
'duties' => $params['duties'] ?? '',
|
'duties' => $params['duties'] ?? '',
|
||||||
'work_phone' => $params['work_phone'] ?? '',
|
'work_phone' => $params['work_phone'] ?? '',
|
||||||
@ -101,7 +101,7 @@ class SupplierContactsLogic extends BaseLogic
|
|||||||
'fax' => $params['fax'] ?? '',
|
'fax' => $params['fax'] ?? '',
|
||||||
'zip_code' => $params['zip_code'] ?? '',
|
'zip_code' => $params['zip_code'] ?? '',
|
||||||
'family_address' => $params['family_address'] ?? '',
|
'family_address' => $params['family_address'] ?? '',
|
||||||
'id_type' => $params['id_type'] ?: 0,
|
'id_type' => $params['id_type'] ?? 0,
|
||||||
'idcard' => $params['idcard'] ?? '',
|
'idcard' => $params['idcard'] ?? '',
|
||||||
'remark' => $params['remark'] ?? '',
|
'remark' => $params['remark'] ?? '',
|
||||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
|
@ -52,11 +52,11 @@ class SupplierLogic extends BaseLogic
|
|||||||
'supplier_introduction' => $params['supplier_introduction'] ?? '',
|
'supplier_introduction' => $params['supplier_introduction'] ?? '',
|
||||||
'brand_category' => $params['brand_category'] ?? '',
|
'brand_category' => $params['brand_category'] ?? '',
|
||||||
'supplier_photos' => !empty($params['supplier_photos']) ? json_encode($params['supplier_photos']) : null,
|
'supplier_photos' => !empty($params['supplier_photos']) ? json_encode($params['supplier_photos']) : null,
|
||||||
'supplier_group' => $params['supplier_group'] ?: 0,
|
'supplier_group' => $params['supplier_group'] ?? 0,
|
||||||
'supplier_category' => $params['supplier_category'] ?: 0,
|
'supplier_category' => $params['supplier_category'] ?? 0,
|
||||||
'supplier_grade' => $params['supplier_grade'] ?: 0,
|
'supplier_grade' => $params['supplier_grade'] ?? 0,
|
||||||
'contacts' => $params['contacts'] ?? '',
|
'contacts' => $params['contacts'] ?? '',
|
||||||
'contacts_sex' => $params['contacts_sex'] ?: 0,
|
'contacts_sex' => $params['contacts_sex'] ?? 0,
|
||||||
'birthday' => !empty($params['birthday']) ? strtotime($params['birthday']) : 0,
|
'birthday' => !empty($params['birthday']) ? strtotime($params['birthday']) : 0,
|
||||||
'phone' => $params['phone'] ?? '',
|
'phone' => $params['phone'] ?? '',
|
||||||
'email' => $params['email'] ?? '',
|
'email' => $params['email'] ?? '',
|
||||||
@ -69,8 +69,8 @@ class SupplierLogic extends BaseLogic
|
|||||||
'bank_accnout_name' => $params['bank_accnout_name'] ?? '',
|
'bank_accnout_name' => $params['bank_accnout_name'] ?? '',
|
||||||
'bank_account' => $params['bank_account'] ?? '',
|
'bank_account' => $params['bank_account'] ?? '',
|
||||||
'bank_address' => $params['bank_address'] ?? '',
|
'bank_address' => $params['bank_address'] ?? '',
|
||||||
'init_invoice_amount' => $params['init_invoice_amount'] ?: 0,
|
'init_invoice_amount' => $params['init_invoice_amount'] ?? 0,
|
||||||
'credit_limit' => $params['credit_limit'] ?: 0,
|
'credit_limit' => $params['credit_limit'] ?? 0,
|
||||||
'account_period' => $params['account_period'] ?? '',
|
'account_period' => $params['account_period'] ?? '',
|
||||||
]);
|
]);
|
||||||
Db::commit();
|
Db::commit();
|
||||||
@ -103,11 +103,11 @@ class SupplierLogic extends BaseLogic
|
|||||||
'supplier_introduction' => $params['supplier_introduction'] ?? '',
|
'supplier_introduction' => $params['supplier_introduction'] ?? '',
|
||||||
'brand_category' => $params['brand_category'] ?? '',
|
'brand_category' => $params['brand_category'] ?? '',
|
||||||
'supplier_photos' => !empty($params['supplier_photos']) ? json_encode($params['supplier_photos']) : null,
|
'supplier_photos' => !empty($params['supplier_photos']) ? json_encode($params['supplier_photos']) : null,
|
||||||
'supplier_group' => $params['supplier_group'] ?: 0,
|
'supplier_group' => $params['supplier_group'] ?? 0,
|
||||||
'supplier_category' => $params['supplier_category'] ?: 0,
|
'supplier_category' => $params['supplier_category'] ?? 0,
|
||||||
'supplier_grade' => $params['supplier_grade'] ?: 0,
|
'supplier_grade' => $params['supplier_grade'] ?? 0,
|
||||||
'contacts' => $params['contacts'] ?? '',
|
'contacts' => $params['contacts'] ?? '',
|
||||||
'contacts_sex' => $params['contacts_sex'] ?: 0,
|
'contacts_sex' => $params['contacts_sex'] ?? 0,
|
||||||
'birthday' => !empty($params['birthday']) ? strtotime($params['birthday']) : 0,
|
'birthday' => !empty($params['birthday']) ? strtotime($params['birthday']) : 0,
|
||||||
'phone' => $params['phone'] ?? '',
|
'phone' => $params['phone'] ?? '',
|
||||||
'email' => $params['email'] ?? '',
|
'email' => $params['email'] ?? '',
|
||||||
@ -120,8 +120,8 @@ class SupplierLogic extends BaseLogic
|
|||||||
'bank_accnout_name' => $params['bank_accnout_name'] ?? '',
|
'bank_accnout_name' => $params['bank_accnout_name'] ?? '',
|
||||||
'bank_account' => $params['bank_account'] ?? '',
|
'bank_account' => $params['bank_account'] ?? '',
|
||||||
'bank_address' => $params['bank_address'] ?? '',
|
'bank_address' => $params['bank_address'] ?? '',
|
||||||
'init_invoice_amount' => $params['init_invoice_amount'] ?: 0,
|
'init_invoice_amount' => $params['init_invoice_amount'] ?? 0,
|
||||||
'credit_limit' => $params['credit_limit'] ?: 0,
|
'credit_limit' => $params['credit_limit'] ?? 0,
|
||||||
'account_period' => $params['account_period'] ?? '',
|
'account_period' => $params['account_period'] ?? '',
|
||||||
'update_time' => time(),
|
'update_time' => time(),
|
||||||
]);
|
]);
|
||||||
|
@ -118,11 +118,11 @@ class GeneratorLogic extends BaseLogic
|
|||||||
GenerateColumn::update([
|
GenerateColumn::update([
|
||||||
'id' => $item['id'],
|
'id' => $item['id'],
|
||||||
'column_comment' => $item['column_comment'] ?? '',
|
'column_comment' => $item['column_comment'] ?? '',
|
||||||
'is_required' => $item['is_required'] ?: 0,
|
'is_required' => $item['is_required'] ?? 0,
|
||||||
'is_insert' => $item['is_insert'] ?: 0,
|
'is_insert' => $item['is_insert'] ?? 0,
|
||||||
'is_update' => $item['is_update'] ?: 0,
|
'is_update' => $item['is_update'] ?? 0,
|
||||||
'is_lists' => $item['is_lists'] ?: 0,
|
'is_lists' => $item['is_lists'] ?? 0,
|
||||||
'is_query' => $item['is_query'] ?: 0,
|
'is_query' => $item['is_query'] ?? 0,
|
||||||
'query_type' => $item['query_type'],
|
'query_type' => $item['query_type'],
|
||||||
'view_type' => $item['view_type'],
|
'view_type' => $item['view_type'],
|
||||||
'dict_type' => $item['dict_type'] ?? '',
|
'dict_type' => $item['dict_type'] ?? '',
|
||||||
@ -436,7 +436,7 @@ class GeneratorLogic extends BaseLogic
|
|||||||
}
|
}
|
||||||
|
|
||||||
$options['menu'] = [
|
$options['menu'] = [
|
||||||
'pid' => intval($menuConfig['pid'] ?: 0),
|
'pid' => intval($menuConfig['pid'] ?? 0),
|
||||||
'type' => intval($menuConfig['type'] ?? GeneratorEnum::GEN_SELF),
|
'type' => intval($menuConfig['type'] ?? GeneratorEnum::GEN_SELF),
|
||||||
'name' => !empty($menuConfig['name']) ? $menuConfig['name'] : $options['table_comment'],
|
'name' => !empty($menuConfig['name']) ? $menuConfig['name'] : $options['table_comment'],
|
||||||
];
|
];
|
||||||
|
@ -81,7 +81,7 @@ class NoticeLogic extends BaseLogic
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 跳转路径
|
// 跳转路径
|
||||||
$jumpPath = self::getPathByScene($params['scene_id'], $params['params']['order_id'] ?: 0);
|
$jumpPath = self::getPathByScene($params['scene_id'], $params['params']['order_id'] ?? 0);
|
||||||
$params['url'] = $jumpPath['url'];
|
$params['url'] = $jumpPath['url'];
|
||||||
$params['page'] = $jumpPath['page'];
|
$params['page'] = $jumpPath['page'];
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ class NoticeLogic extends BaseLogic
|
|||||||
public static function addNotice($params, $noticeSetting, $sendType, $content, $extra = '')
|
public static function addNotice($params, $noticeSetting, $sendType, $content, $extra = '')
|
||||||
{
|
{
|
||||||
return NoticeRecord::create([
|
return NoticeRecord::create([
|
||||||
'user_id' => $params['params']['user_id'] ?: 0,
|
'user_id' => $params['params']['user_id'] ?? 0,
|
||||||
'title' => self::getTitleByScene($sendType, $noticeSetting),
|
'title' => self::getTitleByScene($sendType, $noticeSetting),
|
||||||
'content' => $content,
|
'content' => $content,
|
||||||
'scene_id' => $noticeSetting['scene_id'],
|
'scene_id' => $noticeSetting['scene_id'],
|
||||||
|
@ -144,7 +144,7 @@ abstract class BaseGenerator
|
|||||||
public function setMenuConfig()
|
public function setMenuConfig()
|
||||||
{
|
{
|
||||||
$this->menuConfig = [
|
$this->menuConfig = [
|
||||||
'pid' => $this->tableData['menu']['pid'] ?: 0,
|
'pid' => $this->tableData['menu']['pid'] ?? 0,
|
||||||
'type' => $this->tableData['menu']['type'] ?? GeneratorEnum::DELETE_TRUE,
|
'type' => $this->tableData['menu']['type'] ?? GeneratorEnum::DELETE_TRUE,
|
||||||
'name' => $this->tableData['menu']['name'] ?? $this->tableData['table_comment']
|
'name' => $this->tableData['menu']['name'] ?? $this->tableData['table_comment']
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user