This commit is contained in:
weiz 2024-02-04 16:57:42 +08:00
parent c10139c098
commit 7722f84bf8
24 changed files with 144 additions and 0 deletions

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}