From ff98e33472fd343a5f0b85ef2c7f013de64065a5 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 2 Dec 2023 19:00:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bid/BidDocumentExaminationController.php | 108 ++++++++++++ ...BidDocumentExaminationDetailController.php | 108 ++++++++++++ .../controller/bid/BidResultController.php | 108 ++++++++++++ .../contract/ContractController.php | 108 ++++++++++++ .../bid/BidDocumentExaminationDetailLists.php | 77 +++++++++ .../lists/bid/BidDocumentExaminationLists.php | 77 +++++++++ app/adminapi/lists/bid/BidResultLists.php | 77 +++++++++ app/adminapi/lists/contract/ContractLists.php | 77 +++++++++ .../bid/BidDocumentExaminationDetailLogic.php | 122 +++++++++++++ .../logic/bid/BidDocumentExaminationLogic.php | 140 +++++++++++++++ app/adminapi/logic/bid/BidResultLogic.php | 120 +++++++++++++ app/adminapi/logic/contract/ContractLogic.php | 160 ++++++++++++++++++ .../BidDocumentExaminationDetailValidate.php | 94 ++++++++++ .../bid/BidDocumentExaminationValidate.php | 94 ++++++++++ .../validate/bid/BidResultValidate.php | 94 ++++++++++ .../validate/contract/ContractValidate.php | 94 ++++++++++ .../model/bid/BidDocumentExamination.php | 34 ++++ .../bid/BidDocumentExaminationDetail.php | 34 ++++ app/common/model/bid/BidResult.php | 34 ++++ app/common/model/contract/Contract.php | 34 ++++ 20 files changed, 1794 insertions(+) create mode 100644 app/adminapi/controller/bid/BidDocumentExaminationController.php create mode 100644 app/adminapi/controller/bid/BidDocumentExaminationDetailController.php create mode 100644 app/adminapi/controller/bid/BidResultController.php create mode 100644 app/adminapi/controller/contract/ContractController.php create mode 100644 app/adminapi/lists/bid/BidDocumentExaminationDetailLists.php create mode 100644 app/adminapi/lists/bid/BidDocumentExaminationLists.php create mode 100644 app/adminapi/lists/bid/BidResultLists.php create mode 100644 app/adminapi/lists/contract/ContractLists.php create mode 100644 app/adminapi/logic/bid/BidDocumentExaminationDetailLogic.php create mode 100644 app/adminapi/logic/bid/BidDocumentExaminationLogic.php create mode 100644 app/adminapi/logic/bid/BidResultLogic.php create mode 100644 app/adminapi/logic/contract/ContractLogic.php create mode 100644 app/adminapi/validate/bid/BidDocumentExaminationDetailValidate.php create mode 100644 app/adminapi/validate/bid/BidDocumentExaminationValidate.php create mode 100644 app/adminapi/validate/bid/BidResultValidate.php create mode 100644 app/adminapi/validate/contract/ContractValidate.php create mode 100644 app/common/model/bid/BidDocumentExamination.php create mode 100644 app/common/model/bid/BidDocumentExaminationDetail.php create mode 100644 app/common/model/bid/BidResult.php create mode 100644 app/common/model/contract/Contract.php diff --git a/app/adminapi/controller/bid/BidDocumentExaminationController.php b/app/adminapi/controller/bid/BidDocumentExaminationController.php new file mode 100644 index 000000000..9fd8d3f8d --- /dev/null +++ b/app/adminapi/controller/bid/BidDocumentExaminationController.php @@ -0,0 +1,108 @@ +dataLists(new BidDocumentExaminationLists()); + } + + + /** + * @notes 添加标书审查 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 09:52 + */ + public function add() + { + $params = (new BidDocumentExaminationValidate())->post()->goCheck('add'); + $result = BidDocumentExaminationLogic::add($params); + if (true === $result) { + return $this->success('添加成功', [], 1, 1); + } + return $this->fail(BidDocumentExaminationLogic::getError()); + } + + + /** + * @notes 编辑标书审查 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 09:52 + */ + public function edit() + { + $params = (new BidDocumentExaminationValidate())->post()->goCheck('edit'); + $result = BidDocumentExaminationLogic::edit($params); + if (true === $result) { + return $this->success('编辑成功', [], 1, 1); + } + return $this->fail(BidDocumentExaminationLogic::getError()); + } + + + /** + * @notes 删除标书审查 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 09:52 + */ + public function delete() + { + $params = (new BidDocumentExaminationValidate())->post()->goCheck('delete'); + BidDocumentExaminationLogic::delete($params); + return $this->success('删除成功', [], 1, 1); + } + + + /** + * @notes 获取标书审查详情 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 09:52 + */ + public function detail() + { + $params = (new BidDocumentExaminationValidate())->goCheck('detail'); + $result = BidDocumentExaminationLogic::detail($params); + return $this->data($result); + } + + +} \ No newline at end of file diff --git a/app/adminapi/controller/bid/BidDocumentExaminationDetailController.php b/app/adminapi/controller/bid/BidDocumentExaminationDetailController.php new file mode 100644 index 000000000..d9d706570 --- /dev/null +++ b/app/adminapi/controller/bid/BidDocumentExaminationDetailController.php @@ -0,0 +1,108 @@ +dataLists(new BidDocumentExaminationDetailLists()); + } + + + /** + * @notes 添加标书审查-报价明细 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 09:59 + */ + public function add() + { + $params = (new BidDocumentExaminationDetailValidate())->post()->goCheck('add'); + $result = BidDocumentExaminationDetailLogic::add($params); + if (true === $result) { + return $this->success('添加成功', [], 1, 1); + } + return $this->fail(BidDocumentExaminationDetailLogic::getError()); + } + + + /** + * @notes 编辑标书审查-报价明细 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 09:59 + */ + public function edit() + { + $params = (new BidDocumentExaminationDetailValidate())->post()->goCheck('edit'); + $result = BidDocumentExaminationDetailLogic::edit($params); + if (true === $result) { + return $this->success('编辑成功', [], 1, 1); + } + return $this->fail(BidDocumentExaminationDetailLogic::getError()); + } + + + /** + * @notes 删除标书审查-报价明细 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 09:59 + */ + public function delete() + { + $params = (new BidDocumentExaminationDetailValidate())->post()->goCheck('delete'); + BidDocumentExaminationDetailLogic::delete($params); + return $this->success('删除成功', [], 1, 1); + } + + + /** + * @notes 获取标书审查-报价明细详情 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 09:59 + */ + public function detail() + { + $params = (new BidDocumentExaminationDetailValidate())->goCheck('detail'); + $result = BidDocumentExaminationDetailLogic::detail($params); + return $this->data($result); + } + + +} \ No newline at end of file diff --git a/app/adminapi/controller/bid/BidResultController.php b/app/adminapi/controller/bid/BidResultController.php new file mode 100644 index 000000000..c8d3a78d9 --- /dev/null +++ b/app/adminapi/controller/bid/BidResultController.php @@ -0,0 +1,108 @@ +dataLists(new BidResultLists()); + } + + + /** + * @notes 添加投标结果 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 14:54 + */ + public function add() + { + $params = (new BidResultValidate())->post()->goCheck('add'); + $result = BidResultLogic::add($params); + if (true === $result) { + return $this->success('添加成功', [], 1, 1); + } + return $this->fail(BidResultLogic::getError()); + } + + + /** + * @notes 编辑投标结果 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 14:54 + */ + public function edit() + { + $params = (new BidResultValidate())->post()->goCheck('edit'); + $result = BidResultLogic::edit($params); + if (true === $result) { + return $this->success('编辑成功', [], 1, 1); + } + return $this->fail(BidResultLogic::getError()); + } + + + /** + * @notes 删除投标结果 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 14:54 + */ + public function delete() + { + $params = (new BidResultValidate())->post()->goCheck('delete'); + BidResultLogic::delete($params); + return $this->success('删除成功', [], 1, 1); + } + + + /** + * @notes 获取投标结果详情 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 14:54 + */ + public function detail() + { + $params = (new BidResultValidate())->goCheck('detail'); + $result = BidResultLogic::detail($params); + return $this->data($result); + } + + +} \ No newline at end of file diff --git a/app/adminapi/controller/contract/ContractController.php b/app/adminapi/controller/contract/ContractController.php new file mode 100644 index 000000000..89edb2be6 --- /dev/null +++ b/app/adminapi/controller/contract/ContractController.php @@ -0,0 +1,108 @@ +dataLists(new ContractLists()); + } + + + /** + * @notes 添加项目合同 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 17:19 + */ + public function add() + { + $params = (new ContractValidate())->post()->goCheck('add'); + $result = ContractLogic::add($params); + if (true === $result) { + return $this->success('添加成功', [], 1, 1); + } + return $this->fail(ContractLogic::getError()); + } + + + /** + * @notes 编辑项目合同 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 17:19 + */ + public function edit() + { + $params = (new ContractValidate())->post()->goCheck('edit'); + $result = ContractLogic::edit($params); + if (true === $result) { + return $this->success('编辑成功', [], 1, 1); + } + return $this->fail(ContractLogic::getError()); + } + + + /** + * @notes 删除项目合同 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 17:19 + */ + public function delete() + { + $params = (new ContractValidate())->post()->goCheck('delete'); + ContractLogic::delete($params); + return $this->success('删除成功', [], 1, 1); + } + + + /** + * @notes 获取项目合同详情 + * @return \think\response\Json + * @author likeadmin + * @date 2023/12/02 17:19 + */ + public function detail() + { + $params = (new ContractValidate())->goCheck('detail'); + $result = ContractLogic::detail($params); + return $this->data($result); + } + + +} \ No newline at end of file diff --git a/app/adminapi/lists/bid/BidDocumentExaminationDetailLists.php b/app/adminapi/lists/bid/BidDocumentExaminationDetailLists.php new file mode 100644 index 000000000..9ae3a5364 --- /dev/null +++ b/app/adminapi/lists/bid/BidDocumentExaminationDetailLists.php @@ -0,0 +1,77 @@ + ['bid_document_examination_id', 'product_id'], + ]; + } + + + /** + * @notes 获取标书审查-报价明细列表 + * @return array + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + * @author likeadmin + * @date 2023/12/02 09:59 + */ + public function lists(): array + { + return BidDocumentExaminationDetail::where($this->searchWhere) + ->field(['id', 'bid_document_examination_id', 'product_id', 'product_num', 'cost_unit_price', 'amount', 'rate', 'unit_price', 'total_amount', 'create_user']) + ->limit($this->limitOffset, $this->limitLength) + ->order(['id' => 'desc']) + ->select() + ->toArray(); + } + + + /** + * @notes 获取标书审查-报价明细数量 + * @return int + * @author likeadmin + * @date 2023/12/02 09:59 + */ + public function count(): int + { + return BidDocumentExaminationDetail::where($this->searchWhere)->count(); + } + +} \ No newline at end of file diff --git a/app/adminapi/lists/bid/BidDocumentExaminationLists.php b/app/adminapi/lists/bid/BidDocumentExaminationLists.php new file mode 100644 index 000000000..4a83c6df7 --- /dev/null +++ b/app/adminapi/lists/bid/BidDocumentExaminationLists.php @@ -0,0 +1,77 @@ + ['buy_bidding_document_id'], + ]; + } + + + /** + * @notes 获取标书审查列表 + * @return array + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + * @author likeadmin + * @date 2023/12/02 09:52 + */ + public function lists(): array + { + return BidDocumentExamination::where($this->searchWhere) + ->field(['id', 'approve_id', 'buy_bidding_document_id', 'is_need_deposit', 'bid_opening_date', 'deposit_refund_time', 'bidding_project_overview', 'project_introduction', 'annex', 'technical_protocol_deviation', 'protocol_deviation_handling_plan', 'technical_review_annex', 'business_review_total_amount', 'tax_rate', 'pay_type', 'pay_rate', 'business_contract_deviation', 'business_contract_deviation_handling_plan', 'business_contract_deviation_annex']) + ->limit($this->limitOffset, $this->limitLength) + ->order(['id' => 'desc']) + ->select() + ->toArray(); + } + + + /** + * @notes 获取标书审查数量 + * @return int + * @author likeadmin + * @date 2023/12/02 09:52 + */ + public function count(): int + { + return BidDocumentExamination::where($this->searchWhere)->count(); + } + +} \ No newline at end of file diff --git a/app/adminapi/lists/bid/BidResultLists.php b/app/adminapi/lists/bid/BidResultLists.php new file mode 100644 index 000000000..4398b5b51 --- /dev/null +++ b/app/adminapi/lists/bid/BidResultLists.php @@ -0,0 +1,77 @@ + ['bid_document_examination_id', 'project_id'], + ]; + } + + + /** + * @notes 获取投标结果列表 + * @return array + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + * @author likeadmin + * @date 2023/12/02 14:54 + */ + public function lists(): array + { + return BidResult::where($this->searchWhere) + ->field(['id', 'bid_document_examination_id', 'project_id', 'is_successful', 'bidder', 'bidder_amount', 'bidder_amount_daxie']) + ->limit($this->limitOffset, $this->limitLength) + ->order(['id' => 'desc']) + ->select() + ->toArray(); + } + + + /** + * @notes 获取投标结果数量 + * @return int + * @author likeadmin + * @date 2023/12/02 14:54 + */ + public function count(): int + { + return BidResult::where($this->searchWhere)->count(); + } + +} \ No newline at end of file diff --git a/app/adminapi/lists/contract/ContractLists.php b/app/adminapi/lists/contract/ContractLists.php new file mode 100644 index 000000000..ffd05fd39 --- /dev/null +++ b/app/adminapi/lists/contract/ContractLists.php @@ -0,0 +1,77 @@ + ['contract_name', 'contract_type'], + ]; + } + + + /** + * @notes 获取项目合同列表 + * @return array + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + * @author likeadmin + * @date 2023/12/02 17:19 + */ + public function lists(): array + { + return Contract::where($this->searchWhere) + ->field(['approve_id', 'customer_id', 'buy_bidding_document_id', 'contract_name', 'contract_code', 'contract_type', 'contract_pricing_method', 'party_a', 'party_b', 'amount', 'business_director', 'contract_status', 'expire', 'contract_date']) + ->limit($this->limitOffset, $this->limitLength) + ->order(['approve_id' => 'desc']) + ->select() + ->toArray(); + } + + + /** + * @notes 获取项目合同数量 + * @return int + * @author likeadmin + * @date 2023/12/02 17:19 + */ + public function count(): int + { + return Contract::where($this->searchWhere)->count(); + } + +} \ No newline at end of file diff --git a/app/adminapi/logic/bid/BidDocumentExaminationDetailLogic.php b/app/adminapi/logic/bid/BidDocumentExaminationDetailLogic.php new file mode 100644 index 000000000..0204135bd --- /dev/null +++ b/app/adminapi/logic/bid/BidDocumentExaminationDetailLogic.php @@ -0,0 +1,122 @@ + $params['bid_document_examination_id'], + 'product_id' => $params['product_id'], + 'product_num' => $params['product_num'], + 'cost_unit_price' => $params['cost_unit_price'], + 'amount' => $params['amount'], + 'rate' => $params['rate'], + 'unit_price' => $params['unit_price'], + 'total_amount' => $params['total_amount'], + 'create_user' => $params['create_user'] + ]); + + Db::commit(); + return true; + } catch (\Exception $e) { + Db::rollback(); + self::setError($e->getMessage()); + return false; + } + } + + + /** + * @notes 编辑标书审查-报价明细 + * @param array $params + * @return bool + * @author likeadmin + * @date 2023/12/02 09:59 + */ + public static function edit(array $params): bool + { + Db::startTrans(); + try { + BidDocumentExaminationDetail::where('id', $params['id'])->update([ + 'bid_document_examination_id' => $params['bid_document_examination_id'], + 'product_id' => $params['product_id'], + 'product_num' => $params['product_num'], + 'cost_unit_price' => $params['cost_unit_price'], + 'amount' => $params['amount'], + 'rate' => $params['rate'], + 'unit_price' => $params['unit_price'], + 'total_amount' => $params['total_amount'], + 'create_user' => $params['create_user'] + ]); + + Db::commit(); + return true; + } catch (\Exception $e) { + Db::rollback(); + self::setError($e->getMessage()); + return false; + } + } + + + /** + * @notes 删除标书审查-报价明细 + * @param array $params + * @return bool + * @author likeadmin + * @date 2023/12/02 09:59 + */ + public static function delete(array $params): bool + { + return BidDocumentExaminationDetail::destroy($params['id']); + } + + + /** + * @notes 获取标书审查-报价明细详情 + * @param $params + * @return array + * @author likeadmin + * @date 2023/12/02 09:59 + */ + public static function detail($params): array + { + return BidDocumentExaminationDetail::findOrEmpty($params['id'])->toArray(); + } +} \ No newline at end of file diff --git a/app/adminapi/logic/bid/BidDocumentExaminationLogic.php b/app/adminapi/logic/bid/BidDocumentExaminationLogic.php new file mode 100644 index 000000000..2ffda0d1e --- /dev/null +++ b/app/adminapi/logic/bid/BidDocumentExaminationLogic.php @@ -0,0 +1,140 @@ + $params['approve_id'], + 'buy_bidding_document_id' => $params['buy_bidding_document_id'], + 'is_need_deposit' => $params['is_need_deposit'], + 'bid_opening_date' => strtotime($params['bid_opening_date']), + 'deposit_refund_time' => strtotime($params['deposit_refund_time']), + 'bidding_project_overview' => $params['bidding_project_overview'], + 'project_introduction' => $params['project_introduction'], + 'annex' => $params['annex'], + 'technical_protocol_deviation' => $params['technical_protocol_deviation'], + 'protocol_deviation_handling_plan' => $params['protocol_deviation_handling_plan'], + 'technical_review_annex' => $params['technical_review_annex'], + 'business_review_total_amount' => $params['business_review_total_amount'], + 'tax_rate' => $params['tax_rate'], + 'pay_type' => $params['pay_type'], + 'pay_rate' => $params['pay_rate'], + 'business_contract_deviation' => $params['business_contract_deviation'], + 'business_contract_deviation_handling_plan' => $params['business_contract_deviation_handling_plan'], + 'business_contract_deviation_annex' => $params['business_contract_deviation_annex'] + ]); + + Db::commit(); + return true; + } catch (\Exception $e) { + Db::rollback(); + self::setError($e->getMessage()); + return false; + } + } + + + /** + * @notes 编辑标书审查 + * @param array $params + * @return bool + * @author likeadmin + * @date 2023/12/02 09:52 + */ + public static function edit(array $params): bool + { + Db::startTrans(); + try { + BidDocumentExamination::where('id', $params['id'])->update([ + 'approve_id' => $params['approve_id'], + 'buy_bidding_document_id' => $params['buy_bidding_document_id'], + 'is_need_deposit' => $params['is_need_deposit'], + 'bid_opening_date' => strtotime($params['bid_opening_date']), + 'deposit_refund_time' => strtotime($params['deposit_refund_time']), + 'bidding_project_overview' => $params['bidding_project_overview'], + 'project_introduction' => $params['project_introduction'], + 'annex' => $params['annex'], + 'technical_protocol_deviation' => $params['technical_protocol_deviation'], + 'protocol_deviation_handling_plan' => $params['protocol_deviation_handling_plan'], + 'technical_review_annex' => $params['technical_review_annex'], + 'business_review_total_amount' => $params['business_review_total_amount'], + 'tax_rate' => $params['tax_rate'], + 'pay_type' => $params['pay_type'], + 'pay_rate' => $params['pay_rate'], + 'business_contract_deviation' => $params['business_contract_deviation'], + 'business_contract_deviation_handling_plan' => $params['business_contract_deviation_handling_plan'], + 'business_contract_deviation_annex' => $params['business_contract_deviation_annex'] + ]); + + Db::commit(); + return true; + } catch (\Exception $e) { + Db::rollback(); + self::setError($e->getMessage()); + return false; + } + } + + + /** + * @notes 删除标书审查 + * @param array $params + * @return bool + * @author likeadmin + * @date 2023/12/02 09:52 + */ + public static function delete(array $params): bool + { + return BidDocumentExamination::destroy($params['id']); + } + + + /** + * @notes 获取标书审查详情 + * @param $params + * @return array + * @author likeadmin + * @date 2023/12/02 09:52 + */ + public static function detail($params): array + { + return BidDocumentExamination::findOrEmpty($params['id'])->toArray(); + } +} \ No newline at end of file diff --git a/app/adminapi/logic/bid/BidResultLogic.php b/app/adminapi/logic/bid/BidResultLogic.php new file mode 100644 index 000000000..49cf7b7d9 --- /dev/null +++ b/app/adminapi/logic/bid/BidResultLogic.php @@ -0,0 +1,120 @@ + $params['bid_document_examination_id'], + 'project_id' => $params['project_id'], + 'is_successful' => $params['is_successful'], + 'bidder' => $params['bidder'], + 'bidder_amount' => $params['bidder_amount'], + 'bidder_amount_daxie' => $params['bidder_amount_daxie'], + 'bid_summary' => $params['bid_summary'], + 'annex' => $params['annex'] + ]); + + Db::commit(); + return true; + } catch (\Exception $e) { + Db::rollback(); + self::setError($e->getMessage()); + return false; + } + } + + + /** + * @notes 编辑投标结果 + * @param array $params + * @return bool + * @author likeadmin + * @date 2023/12/02 14:54 + */ + public static function edit(array $params): bool + { + Db::startTrans(); + try { + BidResult::where('id', $params['id'])->update([ + 'bid_document_examination_id' => $params['bid_document_examination_id'], + 'project_id' => $params['project_id'], + 'is_successful' => $params['is_successful'], + 'bidder' => $params['bidder'], + 'bidder_amount' => $params['bidder_amount'], + 'bidder_amount_daxie' => $params['bidder_amount_daxie'], + 'bid_summary' => $params['bid_summary'], + 'annex' => $params['annex'] + ]); + + Db::commit(); + return true; + } catch (\Exception $e) { + Db::rollback(); + self::setError($e->getMessage()); + return false; + } + } + + + /** + * @notes 删除投标结果 + * @param array $params + * @return bool + * @author likeadmin + * @date 2023/12/02 14:54 + */ + public static function delete(array $params): bool + { + return BidResult::destroy($params['id']); + } + + + /** + * @notes 获取投标结果详情 + * @param $params + * @return array + * @author likeadmin + * @date 2023/12/02 14:54 + */ + public static function detail($params): array + { + return BidResult::findOrEmpty($params['id'])->toArray(); + } +} \ No newline at end of file diff --git a/app/adminapi/logic/contract/ContractLogic.php b/app/adminapi/logic/contract/ContractLogic.php new file mode 100644 index 000000000..ff9436d87 --- /dev/null +++ b/app/adminapi/logic/contract/ContractLogic.php @@ -0,0 +1,160 @@ + $params['customer_id'], + 'approve_id' => $params['approve_id'], + 'buy_bidding_document_id' => $params['buy_bidding_document_id'], + 'contract_name' => $params['contract_name'], + 'contract_code' => $params['contract_code'], + 'contract_type' => $params['contract_type'], + 'contract_pricing_method' => $params['contract_pricing_method'], + 'party_a' => $params['party_a'], + 'party_a_contact_address' => $params['party_a_contact_address'], + 'party_a_diretor' => $params['party_a_diretor'], + 'party_a_phone' => $params['party_a_phone'], + 'party_a_mobile' => $params['party_a_mobile'], + 'party_a_email' => $params['party_a_email'], + 'party_b' => $params['party_b'], + 'party_b_contact_address' => $params['party_b_contact_address'], + 'party_b_diretor' => $params['party_b_diretor'], + 'party_b_phone' => $params['party_b_phone'], + 'party_b_mobile' => $params['party_b_mobile'], + 'party_b_email' => $params['party_b_email'], + 'amount' => $params['amount'], + 'amount_daxie' => $params['amount_daxie'], + 'business_director' => $params['business_director'], + 'contract_status' => $params['contract_status'], + 'expire' => $params['expire'], + 'contract_date' => $params['contract_date'], + 'main_content' => $params['main_content'], + 'remark' => $params['remark'], + 'annex' => $params['annex'] + ]); + + Db::commit(); + return true; + } catch (\Exception $e) { + Db::rollback(); + self::setError($e->getMessage()); + return false; + } + } + + + /** + * @notes 编辑项目合同 + * @param array $params + * @return bool + * @author likeadmin + * @date 2023/12/02 17:19 + */ + public static function edit(array $params): bool + { + Db::startTrans(); + try { + Contract::where('approve_id', $params['approve_id'])->update([ + 'customer_id' => $params['customer_id'], + 'approve_id' => $params['approve_id'], + 'buy_bidding_document_id' => $params['buy_bidding_document_id'], + 'contract_name' => $params['contract_name'], + 'contract_code' => $params['contract_code'], + 'contract_type' => $params['contract_type'], + 'contract_pricing_method' => $params['contract_pricing_method'], + 'party_a' => $params['party_a'], + 'party_a_contact_address' => $params['party_a_contact_address'], + 'party_a_diretor' => $params['party_a_diretor'], + 'party_a_phone' => $params['party_a_phone'], + 'party_a_mobile' => $params['party_a_mobile'], + 'party_a_email' => $params['party_a_email'], + 'party_b' => $params['party_b'], + 'party_b_contact_address' => $params['party_b_contact_address'], + 'party_b_diretor' => $params['party_b_diretor'], + 'party_b_phone' => $params['party_b_phone'], + 'party_b_mobile' => $params['party_b_mobile'], + 'party_b_email' => $params['party_b_email'], + 'amount' => $params['amount'], + 'amount_daxie' => $params['amount_daxie'], + 'business_director' => $params['business_director'], + 'contract_status' => $params['contract_status'], + 'expire' => $params['expire'], + 'contract_date' => $params['contract_date'], + 'main_content' => $params['main_content'], + 'remark' => $params['remark'], + 'annex' => $params['annex'] + ]); + + Db::commit(); + return true; + } catch (\Exception $e) { + Db::rollback(); + self::setError($e->getMessage()); + return false; + } + } + + + /** + * @notes 删除项目合同 + * @param array $params + * @return bool + * @author likeadmin + * @date 2023/12/02 17:19 + */ + public static function delete(array $params): bool + { + return Contract::destroy($params['approve_id']); + } + + + /** + * @notes 获取项目合同详情 + * @param $params + * @return array + * @author likeadmin + * @date 2023/12/02 17:19 + */ + public static function detail($params): array + { + return Contract::findOrEmpty($params['approve_id'])->toArray(); + } +} \ No newline at end of file diff --git a/app/adminapi/validate/bid/BidDocumentExaminationDetailValidate.php b/app/adminapi/validate/bid/BidDocumentExaminationDetailValidate.php new file mode 100644 index 000000000..ab1c90a4c --- /dev/null +++ b/app/adminapi/validate/bid/BidDocumentExaminationDetailValidate.php @@ -0,0 +1,94 @@ + 'require', + ]; + + + /** + * 参数描述 + * @var string[] + */ + protected $field = [ + 'id' => 'id', + ]; + + + /** + * @notes 添加场景 + * @return BidDocumentExaminationDetailValidate + * @author likeadmin + * @date 2023/12/02 09:59 + */ + public function sceneAdd() + { + return $this->remove('id', true); + } + + + /** + * @notes 编辑场景 + * @return BidDocumentExaminationDetailValidate + * @author likeadmin + * @date 2023/12/02 09:59 + */ + public function sceneEdit() + { + return $this->only(['id']); + } + + + /** + * @notes 删除场景 + * @return BidDocumentExaminationDetailValidate + * @author likeadmin + * @date 2023/12/02 09:59 + */ + public function sceneDelete() + { + return $this->only(['id']); + } + + + /** + * @notes 详情场景 + * @return BidDocumentExaminationDetailValidate + * @author likeadmin + * @date 2023/12/02 09:59 + */ + public function sceneDetail() + { + return $this->only(['id']); + } + +} \ No newline at end of file diff --git a/app/adminapi/validate/bid/BidDocumentExaminationValidate.php b/app/adminapi/validate/bid/BidDocumentExaminationValidate.php new file mode 100644 index 000000000..c19855026 --- /dev/null +++ b/app/adminapi/validate/bid/BidDocumentExaminationValidate.php @@ -0,0 +1,94 @@ + 'require', + ]; + + + /** + * 参数描述 + * @var string[] + */ + protected $field = [ + 'id' => 'id', + ]; + + + /** + * @notes 添加场景 + * @return BidDocumentExaminationValidate + * @author likeadmin + * @date 2023/12/02 09:52 + */ + public function sceneAdd() + { + return $this->remove('id', true); + } + + + /** + * @notes 编辑场景 + * @return BidDocumentExaminationValidate + * @author likeadmin + * @date 2023/12/02 09:52 + */ + public function sceneEdit() + { + return $this->only(['id']); + } + + + /** + * @notes 删除场景 + * @return BidDocumentExaminationValidate + * @author likeadmin + * @date 2023/12/02 09:52 + */ + public function sceneDelete() + { + return $this->only(['id']); + } + + + /** + * @notes 详情场景 + * @return BidDocumentExaminationValidate + * @author likeadmin + * @date 2023/12/02 09:52 + */ + public function sceneDetail() + { + return $this->only(['id']); + } + +} \ No newline at end of file diff --git a/app/adminapi/validate/bid/BidResultValidate.php b/app/adminapi/validate/bid/BidResultValidate.php new file mode 100644 index 000000000..1f14ae9b3 --- /dev/null +++ b/app/adminapi/validate/bid/BidResultValidate.php @@ -0,0 +1,94 @@ + 'require', + ]; + + + /** + * 参数描述 + * @var string[] + */ + protected $field = [ + 'id' => 'id', + ]; + + + /** + * @notes 添加场景 + * @return BidResultValidate + * @author likeadmin + * @date 2023/12/02 14:54 + */ + public function sceneAdd() + { + return $this->remove('id', true); + } + + + /** + * @notes 编辑场景 + * @return BidResultValidate + * @author likeadmin + * @date 2023/12/02 14:54 + */ + public function sceneEdit() + { + return $this->only(['id']); + } + + + /** + * @notes 删除场景 + * @return BidResultValidate + * @author likeadmin + * @date 2023/12/02 14:54 + */ + public function sceneDelete() + { + return $this->only(['id']); + } + + + /** + * @notes 详情场景 + * @return BidResultValidate + * @author likeadmin + * @date 2023/12/02 14:54 + */ + public function sceneDetail() + { + return $this->only(['id']); + } + +} \ No newline at end of file diff --git a/app/adminapi/validate/contract/ContractValidate.php b/app/adminapi/validate/contract/ContractValidate.php new file mode 100644 index 000000000..438407f01 --- /dev/null +++ b/app/adminapi/validate/contract/ContractValidate.php @@ -0,0 +1,94 @@ + 'require', + ]; + + + /** + * 参数描述 + * @var string[] + */ + protected $field = [ + 'approve_id' => 'approve_id', + ]; + + + /** + * @notes 添加场景 + * @return ContractValidate + * @author likeadmin + * @date 2023/12/02 17:19 + */ + public function sceneAdd() + { + return $this->remove('approve_id', true); + } + + + /** + * @notes 编辑场景 + * @return ContractValidate + * @author likeadmin + * @date 2023/12/02 17:19 + */ + public function sceneEdit() + { + return $this->only(['approve_id']); + } + + + /** + * @notes 删除场景 + * @return ContractValidate + * @author likeadmin + * @date 2023/12/02 17:19 + */ + public function sceneDelete() + { + return $this->only(['approve_id']); + } + + + /** + * @notes 详情场景 + * @return ContractValidate + * @author likeadmin + * @date 2023/12/02 17:19 + */ + public function sceneDetail() + { + return $this->only(['approve_id']); + } + +} \ No newline at end of file diff --git a/app/common/model/bid/BidDocumentExamination.php b/app/common/model/bid/BidDocumentExamination.php new file mode 100644 index 000000000..b2896f75b --- /dev/null +++ b/app/common/model/bid/BidDocumentExamination.php @@ -0,0 +1,34 @@ +