From 7722f84bf8d32de43af57eea2e49d787c95f80f6 Mon Sep 17 00:00:00 2001 From: weiz <736250432@qq.com> Date: Sun, 4 Feb 2024 16:57:42 +0800 Subject: [PATCH] update --- app/adminapi/logic/contract/ContractNegotiationLogic.php | 6 ++++++ .../contract/SubcontractingContractNegotiationLogic.php | 6 ++++++ app/adminapi/logic/finance/FinanceInvoiceApplyLogic.php | 6 ++++++ app/adminapi/logic/finance/FinancePaymentApplyLogic.php | 6 ++++++ app/adminapi/logic/finance/FinancePaymentPlanLogic.php | 6 ++++++ app/adminapi/logic/finance/FinanceReceiptRecordLogic.php | 6 ++++++ app/adminapi/logic/finance/FinanceRefundApplyLogic.php | 6 ++++++ app/adminapi/logic/finance/FinanceRefundRecordLogic.php | 6 ++++++ app/adminapi/logic/finance/FinanceReturnedMoneyLogic.php | 6 ++++++ app/adminapi/logic/finance/FinanceReturnedRecordLogic.php | 6 ++++++ .../logic/material/MaterialPurchaseRequestLogic.php | 6 ++++++ app/adminapi/logic/project/ProjectCostAdjustmentLogic.php | 6 ++++++ app/adminapi/logic/project/ProjectCostBudgetLogic.php | 6 ++++++ app/adminapi/logic/project/ProjectEquipmentBudgetLogic.php | 6 ++++++ .../logic/project/ProjectExpenseReimbursementLogic.php | 6 ++++++ app/adminapi/logic/project/ProjectLaborBudgetLogic.php | 6 ++++++ app/adminapi/logic/project/ProjectLoanApplyLogic.php | 6 ++++++ app/adminapi/logic/project/ProjectMaterialBudgetLogic.php | 6 ++++++ app/adminapi/logic/project/ProjectSettlementLogic.php | 6 ++++++ .../logic/project/ProjectSubcontractSettlementLogic.php | 6 ++++++ app/adminapi/logic/project/ProjectSubpackageBudgetLogic.php | 6 ++++++ app/adminapi/logic/project/ProjectTotalBudgetLogic.php | 6 ++++++ .../logic/project/ProjectTravelReimbursementLogic.php | 6 ++++++ app/adminapi/logic/project/ProjectTripApplyLogic.php | 6 ++++++ 24 files changed, 144 insertions(+) diff --git a/app/adminapi/logic/contract/ContractNegotiationLogic.php b/app/adminapi/logic/contract/ContractNegotiationLogic.php index b8ef66d63..682432167 100644 --- a/app/adminapi/logic/contract/ContractNegotiationLogic.php +++ b/app/adminapi/logic/contract/ContractNegotiationLogic.php @@ -22,6 +22,7 @@ use app\common\logic\BaseLogic; use app\common\model\custom\Custom; use app\common\model\dept\Dept; use app\common\model\dept\Orgs; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use think\facade\Db; @@ -75,6 +76,7 @@ class ContractNegotiationLogic extends BaseLogic $res->id, 'app\common\model\contract\ContractNegotiation', 'app\adminapi\logic\contract\ContractNegotiationLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -174,6 +176,10 @@ class ContractNegotiationLogic extends BaseLogic $data['project_code'] = $project['project_code']; $data['custom_name'] = $custom['name']; $data['negotiation_type_text'] = $data->negotiation_type_text; + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\contract\ContractNegotiation') + ->where('content_logic','app\adminapi\logic\contract\ContractNegotiationLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/contract/SubcontractingContractNegotiationLogic.php b/app/adminapi/logic/contract/SubcontractingContractNegotiationLogic.php index 3d3a74e34..4b1b241f3 100644 --- a/app/adminapi/logic/contract/SubcontractingContractNegotiationLogic.php +++ b/app/adminapi/logic/contract/SubcontractingContractNegotiationLogic.php @@ -18,6 +18,7 @@ namespace app\adminapi\logic\contract; use app\common\model\contract\SubcontractingContract; use app\common\model\contract\SubcontractingContractNegotiation; use app\common\logic\BaseLogic; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\supplier\Supplier; use think\facade\Db; @@ -64,6 +65,7 @@ class SubcontractingContractNegotiationLogic extends BaseLogic $res->id, 'app\common\model\contract\SubcontractingContractNegotiation', 'app\adminapi\logic\contract\SubcontractingContractNegotiationLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -149,6 +151,10 @@ class SubcontractingContractNegotiationLogic extends BaseLogic $data['project_code'] = $project['project_code']; $data['project_name'] = $project['name']; $data['negotiation_type_text'] = $data->negotiation_type_text; + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\contract\SubcontractingContractNegotiation') + ->where('content_logic','app\adminapi\logic\contract\SubcontractingContractNegotiationLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/finance/FinanceInvoiceApplyLogic.php b/app/adminapi/logic/finance/FinanceInvoiceApplyLogic.php index e4c7fbf7a..160920067 100644 --- a/app/adminapi/logic/finance/FinanceInvoiceApplyLogic.php +++ b/app/adminapi/logic/finance/FinanceInvoiceApplyLogic.php @@ -21,6 +21,7 @@ use app\common\model\dict\DictData; use app\common\model\finance\FinanceInvoiceApply; use app\common\logic\BaseLogic; use app\common\model\finance\FinanceReturnedRecord; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\custom\Custom; use think\facade\Db; @@ -81,6 +82,7 @@ class FinanceInvoiceApplyLogic extends BaseLogic $res->id, 'app\common\model\finance\FinanceInvoiceApply', 'app\adminapi\logic\finance\FinanceInvoiceApplyLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -187,6 +189,10 @@ class FinanceInvoiceApplyLogic extends BaseLogic $data['period_text'] = $data->period_text; $data['tax_rate_text'] = $data->tax_rate_text; $data['invoice_type_text'] = $data->invoice_type_text; + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\finance\FinanceInvoiceApply') + ->where('content_logic','app\adminapi\logic\finance\FinanceInvoiceApplyLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/finance/FinancePaymentApplyLogic.php b/app/adminapi/logic/finance/FinancePaymentApplyLogic.php index c3abe966b..febd05dc7 100644 --- a/app/adminapi/logic/finance/FinancePaymentApplyLogic.php +++ b/app/adminapi/logic/finance/FinancePaymentApplyLogic.php @@ -20,6 +20,7 @@ use app\common\model\contract\ProcurementContract; use app\common\model\contract\SubcontractingContract; use app\common\model\finance\FinancePaymentApply; use app\common\model\finance\FinancePaymentPlan; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\logic\BaseLogic; use app\common\model\supplier\Supplier; @@ -81,6 +82,7 @@ class FinancePaymentApplyLogic extends BaseLogic $res->id, 'app\common\model\finance\FinancePaymentApply', 'app\adminapi\logic\finance\FinancePaymentApplyLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -190,6 +192,10 @@ class FinancePaymentApplyLogic extends BaseLogic $data['contract_name'] = $contract['contract_name']; $data['period'] = $finance_payment_plan->period_text; $data['bank_account_info'] = BankAccount::field('account_sn,deposit_bank,account_name,account')->where('id',$data['bank_account_id'])->findOrEmpty(); + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\finance\FinancePaymentApply') + ->where('content_logic','app\adminapi\logic\finance\FinancePaymentApplyLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/finance/FinancePaymentPlanLogic.php b/app/adminapi/logic/finance/FinancePaymentPlanLogic.php index 8eccf8d73..6917afda9 100644 --- a/app/adminapi/logic/finance/FinancePaymentPlanLogic.php +++ b/app/adminapi/logic/finance/FinancePaymentPlanLogic.php @@ -18,6 +18,7 @@ namespace app\adminapi\logic\finance; use app\common\model\contract\ProcurementContract; use app\common\model\contract\SubcontractingContract; use app\common\model\finance\FinancePaymentPlan; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\logic\BaseLogic; use app\common\model\supplier\Supplier; @@ -71,6 +72,7 @@ class FinancePaymentPlanLogic extends BaseLogic $res->id, 'app\common\model\finance\FinancePaymentPlan', 'app\adminapi\logic\finance\FinancePaymentPlanLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -167,6 +169,10 @@ class FinancePaymentPlanLogic extends BaseLogic } $data['contract_no'] = $contract['contract_no']; $data['contract_name'] = $contract['contract_name']; + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\finance\FinancePaymentPlan') + ->where('content_logic','app\adminapi\logic\finance\FinancePaymentPlanLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/finance/FinanceReceiptRecordLogic.php b/app/adminapi/logic/finance/FinanceReceiptRecordLogic.php index 63208a79d..e5deba01b 100644 --- a/app/adminapi/logic/finance/FinanceReceiptRecordLogic.php +++ b/app/adminapi/logic/finance/FinanceReceiptRecordLogic.php @@ -19,6 +19,7 @@ use app\common\model\contract\ProcurementContract; use app\common\model\contract\SubcontractingContract; use app\common\model\dict\DictData; use app\common\model\finance\FinanceReceiptRecord; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\logic\BaseLogic; use app\common\model\supplier\Supplier; @@ -77,6 +78,7 @@ class FinanceReceiptRecordLogic extends BaseLogic $res->id, 'app\common\model\finance\FinanceReceiptRecord', 'app\adminapi\logic\finance\FinanceReceiptRecordLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -179,6 +181,10 @@ class FinanceReceiptRecordLogic extends BaseLogic $data['contract_no'] = $contract['contract_no']; $data['contract_name'] = $contract['contract_name']; $data['contract_cate'] = $data['contract_type']; + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\finance\FinanceReceiptRecord') + ->where('content_logic','app\adminapi\logic\finance\FinanceReceiptRecordLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/finance/FinanceRefundApplyLogic.php b/app/adminapi/logic/finance/FinanceRefundApplyLogic.php index f5487327a..1d2618617 100644 --- a/app/adminapi/logic/finance/FinanceRefundApplyLogic.php +++ b/app/adminapi/logic/finance/FinanceRefundApplyLogic.php @@ -20,6 +20,7 @@ use app\common\model\contract\Contract; use app\common\model\custom\Custom; use app\common\model\finance\FinanceRefundApply; use app\common\logic\BaseLogic; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use think\facade\Db; @@ -66,6 +67,7 @@ class FinanceRefundApplyLogic extends BaseLogic $res->id, 'app\common\model\finance\FinanceRefundApply', 'app\adminapi\logic\finance\FinanceRefundApplyLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -151,6 +153,10 @@ class FinanceRefundApplyLogic extends BaseLogic $data['contract_code'] = $contract['contract_code']; $data['refund_type_text'] = $data->refund_type_text; $data['bank_account_info'] = BankAccount::field('account_sn,deposit_bank,account_name,account')->where('id',$data['bank_account_id'])->findOrEmpty(); + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\finance\FinanceRefundApply') + ->where('content_logic','app\adminapi\logic\finance\FinanceRefundApplyLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/finance/FinanceRefundRecordLogic.php b/app/adminapi/logic/finance/FinanceRefundRecordLogic.php index baedd8b6a..fbff3763d 100644 --- a/app/adminapi/logic/finance/FinanceRefundRecordLogic.php +++ b/app/adminapi/logic/finance/FinanceRefundRecordLogic.php @@ -20,6 +20,7 @@ use app\common\model\contract\ProcurementContract; use app\common\model\contract\SubcontractingContract; use app\common\model\finance\FinanceRefundRecord; use app\common\logic\BaseLogic; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\supplier\Supplier; use think\facade\Db; @@ -72,6 +73,7 @@ class FinanceRefundRecordLogic extends BaseLogic $res->id, 'app\common\model\finance\FinanceRefundRecord', 'app\adminapi\logic\finance\FinanceRefundRecordLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -170,6 +172,10 @@ class FinanceRefundRecordLogic extends BaseLogic $data['contract_type_text'] = $data->contract_type_text; $data['refund_type_text'] = $data->refund_type_text; $data['bank_account_info'] = BankAccount::field('account_sn,deposit_bank,account_name,account')->where('id',$data['bank_account_id'])->findOrEmpty(); + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\finance\FinanceRefundRecord') + ->where('content_logic','app\adminapi\logic\finance\FinanceRefundRecordLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/finance/FinanceReturnedMoneyLogic.php b/app/adminapi/logic/finance/FinanceReturnedMoneyLogic.php index 18dda9487..96c5412c8 100644 --- a/app/adminapi/logic/finance/FinanceReturnedMoneyLogic.php +++ b/app/adminapi/logic/finance/FinanceReturnedMoneyLogic.php @@ -19,6 +19,7 @@ use app\common\model\auth\Admin; use app\common\model\contract\Contract; use app\common\model\finance\FinanceReturnedMoney; use app\common\logic\BaseLogic; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\custom\Custom; use think\facade\Db; @@ -62,6 +63,7 @@ class FinanceReturnedMoneyLogic extends BaseLogic $res->id, 'app\common\model\finance\FinanceReturnedMoney', 'app\adminapi\logic\finance\FinanceReturnedMoneyLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -144,6 +146,10 @@ class FinanceReturnedMoneyLogic extends BaseLogic $data['period_text'] = $data->period_text; $data['return_status_text'] = $data->return_status_text; $data['return_duty'] = $return_duty['name']; + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\finance\FinanceReturnedMoney') + ->where('content_logic','app\adminapi\logic\finance\FinanceReturnedMoneyLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/finance/FinanceReturnedRecordLogic.php b/app/adminapi/logic/finance/FinanceReturnedRecordLogic.php index 207edf87c..6e73cafc0 100644 --- a/app/adminapi/logic/finance/FinanceReturnedRecordLogic.php +++ b/app/adminapi/logic/finance/FinanceReturnedRecordLogic.php @@ -21,6 +21,7 @@ use app\common\model\custom\Custom; use app\common\model\finance\FinanceReturnedMoney; use app\common\model\finance\FinanceReturnedRecord; use app\common\logic\BaseLogic; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use think\facade\Db; @@ -67,6 +68,7 @@ class FinanceReturnedRecordLogic extends BaseLogic $res->id, 'app\common\model\finance\FinanceReturnedRecord', 'app\adminapi\logic\finance\FinanceReturnedRecordLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -157,6 +159,10 @@ class FinanceReturnedRecordLogic extends BaseLogic $data['invoice_status_text'] = $data->invoice_status_text; $data['pay_type_text'] = $data->pay_type_text; $data['bank_account_info'] = BankAccount::field('account_sn,deposit_bank,account_name,account')->where('id',$data['bank_account_id'])->findOrEmpty(); + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\finance\FinanceReturnedRecord') + ->where('content_logic','app\adminapi\logic\finance\FinanceReturnedRecordLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/material/MaterialPurchaseRequestLogic.php b/app/adminapi/logic/material/MaterialPurchaseRequestLogic.php index 406fba403..298c70830 100644 --- a/app/adminapi/logic/material/MaterialPurchaseRequestLogic.php +++ b/app/adminapi/logic/material/MaterialPurchaseRequestLogic.php @@ -20,6 +20,7 @@ use app\common\model\dept\Orgs; use app\common\model\material\MaterialPurchaseRequest; use app\common\logic\BaseLogic; use app\common\model\material\MaterialPurchaseRequestDetail; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectMaterialBudgetDetail; use think\facade\Db; @@ -77,6 +78,7 @@ class MaterialPurchaseRequestLogic extends BaseLogic $MaterialPurchaseRequestRes->id, 'app\common\model\material\MaterialPurchaseRequest', 'app\adminapi\logic\material\MaterialPurchaseRequestLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -151,6 +153,10 @@ class MaterialPurchaseRequestLogic extends BaseLogic $data['dept_name'] = $dept['name']; $data['project_name'] = $project['name']; $data['project_code'] = $project['project_code']; + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\material\MaterialPurchaseRequest') + ->where('content_logic','app\adminapi\logic\material\MaterialPurchaseRequestLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/project/ProjectCostAdjustmentLogic.php b/app/adminapi/logic/project/ProjectCostAdjustmentLogic.php index 867d4a19d..24c753515 100644 --- a/app/adminapi/logic/project/ProjectCostAdjustmentLogic.php +++ b/app/adminapi/logic/project/ProjectCostAdjustmentLogic.php @@ -16,6 +16,7 @@ namespace app\adminapi\logic\project; use app\common\model\auth\Admin; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectCostAdjustment; use app\common\logic\BaseLogic; @@ -57,6 +58,7 @@ class ProjectCostAdjustmentLogic extends BaseLogic $res->id, 'app\common\model\project\ProjectCostAdjustment', 'app\adminapi\logic\project\ProjectCostAdjustmentLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -130,6 +132,10 @@ class ProjectCostAdjustmentLogic extends BaseLogic $data['project_code'] = $project['project_code']; $data['add_user'] = $admin[$data['add_user']]; $data['update_user'] = $admin[$data['update_user']]; + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\project\ProjectCostAdjustment') + ->where('content_logic','app\adminapi\logic\project\ProjectCostAdjustmentLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/project/ProjectCostBudgetLogic.php b/app/adminapi/logic/project/ProjectCostBudgetLogic.php index 1a68fd840..d8e0b9e21 100644 --- a/app/adminapi/logic/project/ProjectCostBudgetLogic.php +++ b/app/adminapi/logic/project/ProjectCostBudgetLogic.php @@ -17,6 +17,7 @@ namespace app\adminapi\logic\project; use app\common\model\dept\Dept; use app\common\model\dept\Orgs; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectCostBudget; use app\common\logic\BaseLogic; @@ -70,6 +71,7 @@ class ProjectCostBudgetLogic extends BaseLogic $res->id, 'app\common\model\project\ProjectCostBudget', 'app\adminapi\logic\project\ProjectCostBudgetLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -167,6 +169,10 @@ class ProjectCostBudgetLogic extends BaseLogic $data['dept_name'] = $dept['name']; $data['project_name'] = $project['name']; $data['project_code'] = $project['project_code']; + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\project\ProjectCostBudget') + ->where('content_logic','app\adminapi\logic\project\ProjectCostBudgetLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/project/ProjectEquipmentBudgetLogic.php b/app/adminapi/logic/project/ProjectEquipmentBudgetLogic.php index 1cca8a98d..022cc939c 100644 --- a/app/adminapi/logic/project/ProjectEquipmentBudgetLogic.php +++ b/app/adminapi/logic/project/ProjectEquipmentBudgetLogic.php @@ -17,6 +17,7 @@ namespace app\adminapi\logic\project; use app\common\model\dept\Dept; use app\common\model\dept\Orgs; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectEquipmentBudget; use app\common\logic\BaseLogic; @@ -73,6 +74,7 @@ class ProjectEquipmentBudgetLogic extends BaseLogic $res->id, 'app\common\model\project\ProjectEquipmentBudget', 'app\adminapi\logic\project\ProjectEquipmentBudgetLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -175,6 +177,10 @@ class ProjectEquipmentBudgetLogic extends BaseLogic $data['dept_name'] = $dept['name']; $data['project_name'] = $project['name']; $data['project_code'] = $project['project_code']; + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\project\ProjectEquipmentBudget') + ->where('content_logic','app\adminapi\logic\project\ProjectEquipmentBudgetLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/project/ProjectExpenseReimbursementLogic.php b/app/adminapi/logic/project/ProjectExpenseReimbursementLogic.php index 5ba434b89..d03121428 100644 --- a/app/adminapi/logic/project/ProjectExpenseReimbursementLogic.php +++ b/app/adminapi/logic/project/ProjectExpenseReimbursementLogic.php @@ -17,6 +17,7 @@ namespace app\adminapi\logic\project; use app\common\model\bank\BankAccount; use app\common\model\dict\DictData; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectExpenseReimbursement; use app\common\logic\BaseLogic; @@ -90,6 +91,7 @@ class ProjectExpenseReimbursementLogic extends BaseLogic $res->id, 'app\common\model\project\ProjectExpenseReimbursement', 'app\adminapi\logic\project\ProjectExpenseReimbursementLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -235,6 +237,10 @@ class ProjectExpenseReimbursementLogic extends BaseLogic $data['pay_amount'] = $data['total_amount'] - $data['offset_loan_amount']; $data['reimbursement_type_text'] = $data->reimbursement_type_text; $data['bank_account'] = BankAccount::field('account_sn,deposit_bank,account_name,account')->where('id',$data['bank_account_id'])->findOrEmpty(); + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\project\ProjectExpenseReimbursement') + ->where('content_logic','app\adminapi\logic\project\ProjectExpenseReimbursementLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/project/ProjectLaborBudgetLogic.php b/app/adminapi/logic/project/ProjectLaborBudgetLogic.php index 3fd2c4e13..ea3a13cce 100644 --- a/app/adminapi/logic/project/ProjectLaborBudgetLogic.php +++ b/app/adminapi/logic/project/ProjectLaborBudgetLogic.php @@ -16,6 +16,7 @@ namespace app\adminapi\logic\project; use app\common\model\dept\Dept; use app\common\model\dept\Orgs; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectLaborBudget; use app\common\logic\BaseLogic; @@ -71,6 +72,7 @@ class ProjectLaborBudgetLogic extends BaseLogic $res->id, 'app\common\model\project\ProjectLaborBudget', 'app\adminapi\logic\project\ProjectLaborBudgetLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -171,6 +173,10 @@ class ProjectLaborBudgetLogic extends BaseLogic $data['dept_name'] = $dept['name']; $data['project_name'] = $project['name']; $data['project_code'] = $project['project_code']; + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\project\ProjectLaborBudget') + ->where('content_logic','app\adminapi\logic\project\ProjectLaborBudgetLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/project/ProjectLoanApplyLogic.php b/app/adminapi/logic/project/ProjectLoanApplyLogic.php index 06b1ba007..de6eac30a 100644 --- a/app/adminapi/logic/project/ProjectLoanApplyLogic.php +++ b/app/adminapi/logic/project/ProjectLoanApplyLogic.php @@ -16,6 +16,7 @@ namespace app\adminapi\logic\project; use app\common\model\bank\BankAccount; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectLoanApply; use app\common\logic\BaseLogic; @@ -61,6 +62,7 @@ class ProjectLoanApplyLogic extends BaseLogic $res->id, 'app\common\model\project\ProjectLoanApply', 'app\adminapi\logic\project\ProjectLoanApplyLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -137,6 +139,10 @@ class ProjectLoanApplyLogic extends BaseLogic $data['project_name'] = $project['name']; $data['project_code'] = $project['project_code']; $data['bank_account'] = BankAccount::field('account_sn,deposit_bank,account_name,account')->where('id',$data['bank_account_id'])->findOrEmpty(); + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\project\ProjectLoanApply') + ->where('content_logic','app\adminapi\logic\project\ProjectLoanApplyLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/project/ProjectMaterialBudgetLogic.php b/app/adminapi/logic/project/ProjectMaterialBudgetLogic.php index 80a472543..7023c774f 100644 --- a/app/adminapi/logic/project/ProjectMaterialBudgetLogic.php +++ b/app/adminapi/logic/project/ProjectMaterialBudgetLogic.php @@ -17,6 +17,7 @@ namespace app\adminapi\logic\project; use app\common\model\dept\Dept; use app\common\model\dept\Orgs; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectMaterialBudget; use app\common\logic\BaseLogic; @@ -72,6 +73,7 @@ class ProjectMaterialBudgetLogic extends BaseLogic $project_material_budget->id, 'app\common\model\project\ProjectMaterialBudget', 'app\adminapi\logic\project\ProjectMaterialBudgetLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -170,6 +172,10 @@ class ProjectMaterialBudgetLogic extends BaseLogic $data['dept_name'] = $dept['name']; $data['project_name'] = $project['name']; $data['project_code'] = $project['project_code']; + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\project\ProjectMaterialBudget') + ->where('content_logic','app\adminapi\logic\project\ProjectMaterialBudgetLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/project/ProjectSettlementLogic.php b/app/adminapi/logic/project/ProjectSettlementLogic.php index ecbb13d76..737b6cfa5 100644 --- a/app/adminapi/logic/project/ProjectSettlementLogic.php +++ b/app/adminapi/logic/project/ProjectSettlementLogic.php @@ -18,6 +18,7 @@ namespace app\adminapi\logic\project; use app\common\model\contract\Contract; use app\common\model\contract\ContractNegotiation; use app\common\model\custom\Custom; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectSettlement; use app\common\logic\BaseLogic; @@ -60,6 +61,7 @@ class ProjectSettlementLogic extends BaseLogic $res->id, 'app\common\model\project\ProjectSettlement', 'app\adminapi\logic\project\ProjectSettlementLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -141,6 +143,10 @@ class ProjectSettlementLogic extends BaseLogic $data['negotiation_amount'] = ContractNegotiation::where('contract_id',$data['contract_id'])->sum('negotiation_amount'); //结算差异 $data['settlement_difference'] = bcsub(($data['contract_amount']+$data['negotiation_amount']),$data['settlement_amount']); + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\project\ProjectSettlement') + ->where('content_logic','app\adminapi\logic\project\ProjectSettlementLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data; } } \ No newline at end of file diff --git a/app/adminapi/logic/project/ProjectSubcontractSettlementLogic.php b/app/adminapi/logic/project/ProjectSubcontractSettlementLogic.php index 589045b77..d66f1e773 100644 --- a/app/adminapi/logic/project/ProjectSubcontractSettlementLogic.php +++ b/app/adminapi/logic/project/ProjectSubcontractSettlementLogic.php @@ -17,6 +17,7 @@ namespace app\adminapi\logic\project; use app\common\model\contract\SubcontractingContract; use app\common\model\contract\SubcontractingContractDetail; use app\common\model\contract\SubcontractingContractNegotiation; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectSubcontractSettlement; use app\common\logic\BaseLogic; @@ -60,6 +61,7 @@ class ProjectSubcontractSettlementLogic extends BaseLogic $res->id, 'app\common\model\project\ProjectSubcontractSettlement', 'app\adminapi\logic\project\ProjectSubcontractSettlementLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -143,6 +145,10 @@ class ProjectSubcontractSettlementLogic extends BaseLogic $data['negotiation_amount'] = SubcontractingContractNegotiation::where('contract_id',$data['contract_id'])->sum('negotiation_amount'); //结算差异 $data['settlement_difference'] = bcsub(($data['contract_amount']+$data['negotiation_amount']),$data['settlement_amount']); + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\project\ProjectSubcontractSettlement') + ->where('content_logic','app\adminapi\logic\project\ProjectSubcontractSettlementLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data; } } \ No newline at end of file diff --git a/app/adminapi/logic/project/ProjectSubpackageBudgetLogic.php b/app/adminapi/logic/project/ProjectSubpackageBudgetLogic.php index 062611ce8..b4b7ba1aa 100644 --- a/app/adminapi/logic/project/ProjectSubpackageBudgetLogic.php +++ b/app/adminapi/logic/project/ProjectSubpackageBudgetLogic.php @@ -16,6 +16,7 @@ namespace app\adminapi\logic\project; use app\common\model\dept\Dept; use app\common\model\dept\Orgs; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectSubpackageBudget; use app\common\logic\BaseLogic; @@ -73,6 +74,7 @@ class ProjectSubpackageBudgetLogic extends BaseLogic $res->id, 'app\common\model\project\ProjectSubpackageBudget', 'app\adminapi\logic\project\ProjectSubpackageBudgetLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -177,6 +179,10 @@ class ProjectSubpackageBudgetLogic extends BaseLogic $data['dept_name'] = $dept['name']; $data['project_name'] = $project['name']; $data['project_code'] = $project['project_code']; + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\project\ProjectSubpackageBudget') + ->where('content_logic','app\adminapi\logic\project\ProjectSubpackageBudgetLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/project/ProjectTotalBudgetLogic.php b/app/adminapi/logic/project/ProjectTotalBudgetLogic.php index fdaba0b7d..5d5226c7f 100644 --- a/app/adminapi/logic/project/ProjectTotalBudgetLogic.php +++ b/app/adminapi/logic/project/ProjectTotalBudgetLogic.php @@ -17,6 +17,7 @@ namespace app\adminapi\logic\project; use app\common\model\dept\Dept; use app\common\model\dept\Orgs; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectTotalBudget; use app\common\logic\BaseLogic; @@ -69,6 +70,7 @@ class ProjectTotalBudgetLogic extends BaseLogic $res->id, 'app\common\model\project\ProjectTotalBudget', 'app\adminapi\logic\project\ProjectTotalBudgetLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -164,6 +166,10 @@ class ProjectTotalBudgetLogic extends BaseLogic $data['fy_cost_ratio'] = number_format($data['fy_cost'] / $data['total_cost'],2); //机具成本占比 $data['jj_cost_ratio'] = number_format($data['jj_cost'] / $data['total_cost'],2); + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\project\ProjectTotalBudget') + ->where('content_logic','app\adminapi\logic\project\ProjectTotalBudgetLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/project/ProjectTravelReimbursementLogic.php b/app/adminapi/logic/project/ProjectTravelReimbursementLogic.php index 4d2174eeb..0eca40620 100644 --- a/app/adminapi/logic/project/ProjectTravelReimbursementLogic.php +++ b/app/adminapi/logic/project/ProjectTravelReimbursementLogic.php @@ -18,6 +18,7 @@ namespace app\adminapi\logic\project; use app\common\model\auth\Admin; use app\common\model\bank\BankAccount; use app\common\model\dict\DictData; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectLoanApply; use app\common\model\project\ProjectManagerAppointment; @@ -100,6 +101,7 @@ class ProjectTravelReimbursementLogic extends BaseLogic $res->id, 'app\common\model\project\ProjectTravelReimbursement', 'app\adminapi\logic\project\ProjectTravelReimbursementLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -267,6 +269,10 @@ class ProjectTravelReimbursementLogic extends BaseLogic $data['total_amount'] = ProjectTravelReimbursementDetail::where('travel_reimbursement_id',$data['id'])->sum('total_amount'); $data['pay_amount'] = $data['total_amount'] - $data['offset_loan_amount']; $data['bank_account'] = BankAccount::field('account_sn,deposit_bank,account_name,account')->where('id',$data['bank_account_id'])->findOrEmpty(); + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\project\ProjectTravelReimbursement') + ->where('content_logic','app\adminapi\logic\project\ProjectTravelReimbursementLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/project/ProjectTripApplyLogic.php b/app/adminapi/logic/project/ProjectTripApplyLogic.php index ab954ef7b..55beb40a5 100644 --- a/app/adminapi/logic/project/ProjectTripApplyLogic.php +++ b/app/adminapi/logic/project/ProjectTripApplyLogic.php @@ -16,6 +16,7 @@ namespace app\adminapi\logic\project; use app\common\model\auth\Admin; +use app\common\model\oa\FlowApprove; use app\common\model\project\Project; use app\common\model\project\ProjectManagerAppointment; use app\common\model\project\ProjectTripApply; @@ -62,6 +63,7 @@ class ProjectTripApplyLogic extends BaseLogic $res->id, 'app\common\model\project\ProjectTripApply', 'app\adminapi\logic\project\ProjectTripApplyLogic', + $params['approve_detail']['path'], $params['approve_detail']['flow_type'], $params['approve_detail']['flow_path'], $admin_id @@ -145,6 +147,10 @@ class ProjectTripApplyLogic extends BaseLogic $admin = Admin::field('name')->where('id',$manager['project_manager'])->findOrEmpty(); $data['project_manager'] = $admin['name']; } + $approve_info = FlowApprove::field('id')->where('content_id',$params['id']) + ->where('content_model','app\common\model\project\ProjectTripApply') + ->where('content_logic','app\adminapi\logic\project\ProjectTripApplyLogic')->findOrEmpty(); + $data['approve_id'] = $approve_info['id']; return $data->toArray(); } } \ No newline at end of file