This commit is contained in:
mkm 2023-12-02 19:00:59 +08:00
parent 3ae4c3bafb
commit ff98e33472
20 changed files with 1794 additions and 0 deletions

View File

@ -0,0 +1,108 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\bid;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\bid\BidDocumentExaminationLists;
use app\adminapi\logic\bid\BidDocumentExaminationLogic;
use app\adminapi\validate\bid\BidDocumentExaminationValidate;
/**
* 标书审查控制器
* Class BidDocumentExaminationController
* @package app\adminapi\controller\bid
*/
class BidDocumentExaminationController extends BaseAdminController
{
/**
* @notes 获取标书审查列表
* @return \think\response\Json
* @author likeadmin
* @date 2023/12/02 09:52
*/
public function lists()
{
return $this->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);
}
}

View File

@ -0,0 +1,108 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\bid;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\bid\BidDocumentExaminationDetailLists;
use app\adminapi\logic\bid\BidDocumentExaminationDetailLogic;
use app\adminapi\validate\bid\BidDocumentExaminationDetailValidate;
/**
* 标书审查-报价明细控制器
* Class BidDocumentExaminationDetailController
* @package app\adminapi\controller\bid
*/
class BidDocumentExaminationDetailController extends BaseAdminController
{
/**
* @notes 获取标书审查-报价明细列表
* @return \think\response\Json
* @author likeadmin
* @date 2023/12/02 09:59
*/
public function lists()
{
return $this->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);
}
}

View File

@ -0,0 +1,108 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\bid;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\bid\BidResultLists;
use app\adminapi\logic\bid\BidResultLogic;
use app\adminapi\validate\bid\BidResultValidate;
/**
* 投标结果控制器
* Class BidResultController
* @package app\adminapi\controller\bid
*/
class BidResultController extends BaseAdminController
{
/**
* @notes 获取投标结果列表
* @return \think\response\Json
* @author likeadmin
* @date 2023/12/02 14:54
*/
public function lists()
{
return $this->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);
}
}

View File

@ -0,0 +1,108 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\contract;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\contract\ContractLists;
use app\adminapi\logic\contract\ContractLogic;
use app\adminapi\validate\contract\ContractValidate;
/**
* 项目合同控制器
* Class ContractController
* @package app\adminapi\controller\contract
*/
class ContractController extends BaseAdminController
{
/**
* @notes 获取项目合同列表
* @return \think\response\Json
* @author likeadmin
* @date 2023/12/02 17:19
*/
public function lists()
{
return $this->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);
}
}

View File

@ -0,0 +1,77 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\lists\bid;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\bid\BidDocumentExaminationDetail;
use app\common\lists\ListsSearchInterface;
/**
* 标书审查-报价明细列表
* Class BidDocumentExaminationDetailLists
* @package app\adminapi\listsbid
*/
class BidDocumentExaminationDetailLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2023/12/02 09:59
*/
public function setSearch(): array
{
return [
'=' => ['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();
}
}

View File

@ -0,0 +1,77 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\lists\bid;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\bid\BidDocumentExamination;
use app\common\lists\ListsSearchInterface;
/**
* 标书审查列表
* Class BidDocumentExaminationLists
* @package app\adminapi\listsbid
*/
class BidDocumentExaminationLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2023/12/02 09:52
*/
public function setSearch(): array
{
return [
'=' => ['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();
}
}

View File

@ -0,0 +1,77 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\lists\bid;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\bid\BidResult;
use app\common\lists\ListsSearchInterface;
/**
* 投标结果列表
* Class BidResultLists
* @package app\adminapi\listsbid
*/
class BidResultLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2023/12/02 14:54
*/
public function setSearch(): array
{
return [
'=' => ['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();
}
}

View File

@ -0,0 +1,77 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\lists\contract;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\contract\Contract;
use app\common\lists\ListsSearchInterface;
/**
* 项目合同列表
* Class ContractLists
* @package app\adminapi\listscontract
*/
class ContractLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2023/12/02 17:19
*/
public function setSearch(): array
{
return [
'=' => ['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();
}
}

View File

@ -0,0 +1,122 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\logic\bid;
use app\common\model\bid\BidDocumentExaminationDetail;
use app\common\logic\BaseLogic;
use think\facade\Db;
/**
* 标书审查-报价明细逻辑
* Class BidDocumentExaminationDetailLogic
* @package app\adminapi\logic\bid
*/
class BidDocumentExaminationDetailLogic extends BaseLogic
{
/**
* @notes 添加标书审查-报价明细
* @param array $params
* @return bool
* @author likeadmin
* @date 2023/12/02 09:59
*/
public static function add(array $params): bool
{
Db::startTrans();
try {
BidDocumentExaminationDetail::create([
'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 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();
}
}

View File

@ -0,0 +1,140 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\logic\bid;
use app\common\model\bid\BidDocumentExamination;
use app\common\logic\BaseLogic;
use think\facade\Db;
/**
* 标书审查逻辑
* Class BidDocumentExaminationLogic
* @package app\adminapi\logic\bid
*/
class BidDocumentExaminationLogic extends BaseLogic
{
/**
* @notes 添加标书审查
* @param array $params
* @return bool
* @author likeadmin
* @date 2023/12/02 09:52
*/
public static function add(array $params): bool
{
Db::startTrans();
try {
BidDocumentExamination::create([
'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 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();
}
}

View File

@ -0,0 +1,120 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\logic\bid;
use app\common\model\bid\BidResult;
use app\common\logic\BaseLogic;
use think\facade\Db;
/**
* 投标结果逻辑
* Class BidResultLogic
* @package app\adminapi\logic\bid
*/
class BidResultLogic extends BaseLogic
{
/**
* @notes 添加投标结果
* @param array $params
* @return bool
* @author likeadmin
* @date 2023/12/02 14:54
*/
public static function add(array $params): bool
{
Db::startTrans();
try {
BidResult::create([
'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 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();
}
}

View File

@ -0,0 +1,160 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\logic\contract;
use app\common\model\contract\Contract;
use app\common\logic\BaseLogic;
use think\facade\Db;
/**
* 项目合同逻辑
* Class ContractLogic
* @package app\adminapi\logic\contract
*/
class ContractLogic extends BaseLogic
{
/**
* @notes 添加项目合同
* @param array $params
* @return bool
* @author likeadmin
* @date 2023/12/02 17:19
*/
public static function add(array $params): bool
{
Db::startTrans();
try {
Contract::create([
'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 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();
}
}

View File

@ -0,0 +1,94 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\validate\bid;
use app\common\validate\BaseValidate;
/**
* 标书审查-报价明细验证器
* Class BidDocumentExaminationDetailValidate
* @package app\adminapi\validate\bid
*/
class BidDocumentExaminationDetailValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => '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']);
}
}

View File

@ -0,0 +1,94 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\validate\bid;
use app\common\validate\BaseValidate;
/**
* 标书审查验证器
* Class BidDocumentExaminationValidate
* @package app\adminapi\validate\bid
*/
class BidDocumentExaminationValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => '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']);
}
}

View File

@ -0,0 +1,94 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\validate\bid;
use app\common\validate\BaseValidate;
/**
* 投标结果验证器
* Class BidResultValidate
* @package app\adminapi\validate\bid
*/
class BidResultValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => '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']);
}
}

View File

@ -0,0 +1,94 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\validate\contract;
use app\common\validate\BaseValidate;
/**
* 项目合同验证器
* Class ContractValidate
* @package app\adminapi\validate\contract
*/
class ContractValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'approve_id' => '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']);
}
}

View File

@ -0,0 +1,34 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\common\model\bid;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
/**
* 标书审查模型
* Class BidDocumentExamination
* @package app\common\model\bid
*/
class BidDocumentExamination extends BaseModel
{
use SoftDelete;
protected $name = 'bid_document_examination';
protected $deleteTime = 'delete_time';
}

View File

@ -0,0 +1,34 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\common\model\bid;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
/**
* 标书审查-报价明细模型
* Class BidDocumentExaminationDetail
* @package app\common\model\bid
*/
class BidDocumentExaminationDetail extends BaseModel
{
use SoftDelete;
protected $name = 'bid_document_examination_detail';
protected $deleteTime = 'delete_time';
}

View File

@ -0,0 +1,34 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\common\model\bid;
use app\common\model\BaseModel;
/**
* 投标结果模型
* Class BidResult
* @package app\common\model\bid
*/
class BidResult extends BaseModel
{
protected $name = 'bid_result';
}

View File

@ -0,0 +1,34 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\common\model\contract;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
/**
* 项目合同模型
* Class Contract
* @package app\common\model\contract
*/
class Contract extends BaseModel
{
use SoftDelete;
protected $name = 'contract';
protected $deleteTime = 'delete_time';
}