Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
chenbo 2024-02-26 09:05:16 +08:00
commit 1f78c86f1f
40 changed files with 4091 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\supervision_prepare;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\supervision_prepare\SupervisionConstructionPlanningLists;
use app\adminapi\logic\supervision_prepare\SupervisionConstructionPlanningLogic;
use app\adminapi\validate\supervision_prepare\SupervisionConstructionPlanningValidate;
/**
* 工程监理--开工策划控制器
* Class SupervisionConstructionPlanningController
* @package app\adminapi\controller\supervision_prepare
*/
class SupervisionConstructionPlanningController extends BaseAdminController
{
/**
* @notes 获取工程监理--开工策划列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 17:43
*/
public function lists()
{
return $this->dataLists(new SupervisionConstructionPlanningLists());
}
/**
* @notes 添加工程监理--开工策划
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 17:43
*/
public function add()
{
$params = (new SupervisionConstructionPlanningValidate())->post()->goCheck('add');
$result = SupervisionConstructionPlanningLogic::add($params,$this->adminId);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(SupervisionConstructionPlanningLogic::getError());
}
/**
* @notes 编辑工程监理--开工策划
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 17:43
*/
public function edit()
{
$params = (new SupervisionConstructionPlanningValidate())->post()->goCheck('edit');
$result = SupervisionConstructionPlanningLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(SupervisionConstructionPlanningLogic::getError());
}
/**
* @notes 删除工程监理--开工策划
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 17:43
*/
public function delete()
{
$params = (new SupervisionConstructionPlanningValidate())->post()->goCheck('delete');
SupervisionConstructionPlanningLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取工程监理--开工策划详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 17:43
*/
public function detail()
{
$params = (new SupervisionConstructionPlanningValidate())->goCheck('detail');
$result = SupervisionConstructionPlanningLogic::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\supervision_prepare;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\supervision_prepare\SupervisionContractDisclosureLists;
use app\adminapi\logic\supervision_prepare\SupervisionContractDisclosureLogic;
use app\adminapi\validate\supervision_prepare\SupervisionContractDisclosureValidate;
/**
* 工程监理--监理合同交底控制器
* Class SupervisionContractDisclosureController
* @package app\adminapi\controller\supervision_prepare
*/
class SupervisionContractDisclosureController extends BaseAdminController
{
/**
* @notes 获取工程监理--监理合同交底列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 17:19
*/
public function lists()
{
return $this->dataLists(new SupervisionContractDisclosureLists());
}
/**
* @notes 添加工程监理--监理合同交底
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 17:19
*/
public function add()
{
$params = (new SupervisionContractDisclosureValidate())->post()->goCheck('add');
$result = SupervisionContractDisclosureLogic::add($params,$this->adminId);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(SupervisionContractDisclosureLogic::getError());
}
/**
* @notes 编辑工程监理--监理合同交底
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 17:19
*/
public function edit()
{
$params = (new SupervisionContractDisclosureValidate())->post()->goCheck('edit');
$result = SupervisionContractDisclosureLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(SupervisionContractDisclosureLogic::getError());
}
/**
* @notes 删除工程监理--监理合同交底
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 17:19
*/
public function delete()
{
$params = (new SupervisionContractDisclosureValidate())->post()->goCheck('delete');
SupervisionContractDisclosureLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取工程监理--监理合同交底详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 17:19
*/
public function detail()
{
$params = (new SupervisionContractDisclosureValidate())->goCheck('detail');
$result = SupervisionContractDisclosureLogic::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\supervision_prepare;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\supervision_prepare\SupervisionPlanningLists;
use app\adminapi\logic\supervision_prepare\SupervisionPlanningLogic;
use app\adminapi\validate\supervision_prepare\SupervisionPlanningValidate;
/**
* 工程监理--监理规划控制器
* Class SupervisionPlanningController
* @package app\adminapi\controller\supervision_prepare
*/
class SupervisionPlanningController extends BaseAdminController
{
/**
* @notes 获取工程监理--监理规划列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 16:45
*/
public function lists()
{
return $this->dataLists(new SupervisionPlanningLists());
}
/**
* @notes 添加工程监理--监理规划
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 16:45
*/
public function add()
{
$params = (new SupervisionPlanningValidate())->post()->goCheck('add');
$result = SupervisionPlanningLogic::add($params,$this->adminId);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(SupervisionPlanningLogic::getError());
}
/**
* @notes 编辑工程监理--监理规划
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 16:45
*/
public function edit()
{
$params = (new SupervisionPlanningValidate())->post()->goCheck('edit');
$result = SupervisionPlanningLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(SupervisionPlanningLogic::getError());
}
/**
* @notes 删除工程监理--监理规划
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 16:45
*/
public function delete()
{
$params = (new SupervisionPlanningValidate())->post()->goCheck('delete');
SupervisionPlanningLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取工程监理--监理规划详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 16:45
*/
public function detail()
{
$params = (new SupervisionPlanningValidate())->goCheck('detail');
$result = SupervisionPlanningLogic::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\supervision_project;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\supervision_project\SupervisionMonitoringEquipmentLists;
use app\adminapi\logic\supervision_project\SupervisionMonitoringEquipmentLogic;
use app\adminapi\validate\supervision_project\SupervisionMonitoringEquipmentValidate;
/**
* 工程监理--监控设备信息控制器
* Class SupervisionMonitoringEquipmentController
* @package app\adminapi\controller\supervision_project
*/
class SupervisionMonitoringEquipmentController extends BaseAdminController
{
/**
* @notes 获取工程监理--监控设备信息列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function lists()
{
return $this->dataLists(new SupervisionMonitoringEquipmentLists());
}
/**
* @notes 添加工程监理--监控设备信息
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function add()
{
$params = (new SupervisionMonitoringEquipmentValidate())->post()->goCheck('add');
$result = SupervisionMonitoringEquipmentLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(SupervisionMonitoringEquipmentLogic::getError());
}
/**
* @notes 编辑工程监理--监控设备信息
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function edit()
{
$params = (new SupervisionMonitoringEquipmentValidate())->post()->goCheck('edit');
$result = SupervisionMonitoringEquipmentLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(SupervisionMonitoringEquipmentLogic::getError());
}
/**
* @notes 删除工程监理--监控设备信息
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function delete()
{
$params = (new SupervisionMonitoringEquipmentValidate())->post()->goCheck('delete');
SupervisionMonitoringEquipmentLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取工程监理--监控设备信息详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function detail()
{
$params = (new SupervisionMonitoringEquipmentValidate())->goCheck('detail');
$result = SupervisionMonitoringEquipmentLogic::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\supervision_project;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\supervision_project\SupervisionMonitoringEquipmentDetailLists;
use app\adminapi\logic\supervision_project\SupervisionMonitoringEquipmentDetailLogic;
use app\adminapi\validate\supervision_project\SupervisionMonitoringEquipmentDetailValidate;
/**
* 工程监理--监控设备明细控制器
* Class SupervisionMonitoringEquipmentDetailController
* @package app\adminapi\controller\supervision_project
*/
class SupervisionMonitoringEquipmentDetailController extends BaseAdminController
{
/**
* @notes 获取工程监理--监控设备明细列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function lists()
{
return $this->dataLists(new SupervisionMonitoringEquipmentDetailLists());
}
/**
* @notes 添加工程监理--监控设备明细
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function add()
{
$params = (new SupervisionMonitoringEquipmentDetailValidate())->post()->goCheck('add');
$result = SupervisionMonitoringEquipmentDetailLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(SupervisionMonitoringEquipmentDetailLogic::getError());
}
/**
* @notes 编辑工程监理--监控设备明细
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function edit()
{
$params = (new SupervisionMonitoringEquipmentDetailValidate())->post()->goCheck('edit');
$result = SupervisionMonitoringEquipmentDetailLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(SupervisionMonitoringEquipmentDetailLogic::getError());
}
/**
* @notes 删除工程监理--监控设备明细
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function delete()
{
$params = (new SupervisionMonitoringEquipmentDetailValidate())->post()->goCheck('delete');
SupervisionMonitoringEquipmentDetailLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取工程监理--监控设备明细详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function detail()
{
$params = (new SupervisionMonitoringEquipmentDetailValidate())->goCheck('detail');
$result = SupervisionMonitoringEquipmentDetailLogic::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\supervision_project;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\supervision_project\SupervisionParticipatingUnitsContactsLists;
use app\adminapi\logic\supervision_project\SupervisionParticipatingUnitsContactsLogic;
use app\adminapi\validate\supervision_project\SupervisionParticipatingUnitsContactsValidate;
/**
* 工程监理--参建单位联系人控制器
* Class SupervisionParticipatingUnitsContactsController
* @package app\adminapi\controller\supervision_project
*/
class SupervisionParticipatingUnitsContactsController extends BaseAdminController
{
/**
* @notes 获取工程监理--参建单位联系人列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function lists()
{
return $this->dataLists(new SupervisionParticipatingUnitsContactsLists());
}
/**
* @notes 添加工程监理--参建单位联系人
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function add()
{
$params = (new SupervisionParticipatingUnitsContactsValidate())->post()->goCheck('add');
$result = SupervisionParticipatingUnitsContactsLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(SupervisionParticipatingUnitsContactsLogic::getError());
}
/**
* @notes 编辑工程监理--参建单位联系人
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function edit()
{
$params = (new SupervisionParticipatingUnitsContactsValidate())->post()->goCheck('edit');
$result = SupervisionParticipatingUnitsContactsLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(SupervisionParticipatingUnitsContactsLogic::getError());
}
/**
* @notes 删除工程监理--参建单位联系人
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function delete()
{
$params = (new SupervisionParticipatingUnitsContactsValidate())->post()->goCheck('delete');
SupervisionParticipatingUnitsContactsLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取工程监理--参建单位联系人详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function detail()
{
$params = (new SupervisionParticipatingUnitsContactsValidate())->goCheck('detail');
$result = SupervisionParticipatingUnitsContactsLogic::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\supervision_project;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\supervision_project\SupervisionParticipatingUnitsLists;
use app\adminapi\logic\supervision_project\SupervisionParticipatingUnitsLogic;
use app\adminapi\validate\supervision_project\SupervisionParticipatingUnitsValidate;
/**
* 工程监理--参建单位控制器
* Class SupervisionParticipatingUnitsController
* @package app\adminapi\controller\supervision_project
*/
class SupervisionParticipatingUnitsController extends BaseAdminController
{
/**
* @notes 获取工程监理--参建单位列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function lists()
{
return $this->dataLists(new SupervisionParticipatingUnitsLists());
}
/**
* @notes 添加工程监理--参建单位
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function add()
{
$params = (new SupervisionParticipatingUnitsValidate())->post()->goCheck('add');
$result = SupervisionParticipatingUnitsLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(SupervisionParticipatingUnitsLogic::getError());
}
/**
* @notes 编辑工程监理--参建单位
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function edit()
{
$params = (new SupervisionParticipatingUnitsValidate())->post()->goCheck('edit');
$result = SupervisionParticipatingUnitsLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(SupervisionParticipatingUnitsLogic::getError());
}
/**
* @notes 删除工程监理--参建单位
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function delete()
{
$params = (new SupervisionParticipatingUnitsValidate())->post()->goCheck('delete');
SupervisionParticipatingUnitsLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取工程监理--参建单位详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function detail()
{
$params = (new SupervisionParticipatingUnitsValidate())->goCheck('detail');
$result = SupervisionParticipatingUnitsLogic::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\supervision_project;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\supervision_project\SupervisionProjectLists;
use app\adminapi\logic\supervision_project\SupervisionProjectLogic;
use app\adminapi\validate\supervision_project\SupervisionProjectValidate;
/**
* 工程监理--监理项目信息控制器
* Class SupervisionProjectController
* @package app\adminapi\controller\supervision_project
*/
class SupervisionProjectController extends BaseAdminController
{
/**
* @notes 获取工程监理--监理项目信息列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 09:52
*/
public function lists()
{
return $this->dataLists(new SupervisionProjectLists());
}
/**
* @notes 添加工程监理--监理项目信息
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 09:52
*/
public function add()
{
$params = (new SupervisionProjectValidate())->post()->goCheck('add');
$result = SupervisionProjectLogic::add($params,$this->adminId);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(SupervisionProjectLogic::getError());
}
/**
* @notes 编辑工程监理--监理项目信息
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 09:52
*/
public function edit()
{
$params = (new SupervisionProjectValidate())->post()->goCheck('edit');
$result = SupervisionProjectLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(SupervisionProjectLogic::getError());
}
/**
* @notes 删除工程监理--监理项目信息
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 09:52
*/
public function delete()
{
$params = (new SupervisionProjectValidate())->post()->goCheck('delete');
SupervisionProjectLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取工程监理--监理项目信息详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/23 09:52
*/
public function detail()
{
$params = (new SupervisionProjectValidate())->goCheck('detail');
$result = SupervisionProjectLogic::detail($params);
return $this->data($result);
}
}

View File

@ -0,0 +1,84 @@
<?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\supervision_prepare;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\auth\Admin;
use app\common\model\supervision_prepare\SupervisionConstructionPlanning;
use app\common\lists\ListsSearchInterface;
use app\common\model\supervision_project\SupervisionProject;
/**
* 工程监理--开工策划列表
* Class SupervisionConstructionPlanningLists
* @package app\adminapi\listssupervision_prepare
*/
class SupervisionConstructionPlanningLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/23 17:43
*/
public function setSearch(): array
{
return [
'=' => ['project_id'],
'%like%' => ['doc_name'],
];
}
/**
* @notes 获取工程监理--开工策划列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author likeadmin
* @date 2024/02/23 17:43
*/
public function lists(): array
{
return SupervisionConstructionPlanning::withoutField('update_time,delete_time')->where($this->searchWhere)
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()->each(function($data){
$project = SupervisionProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
$data['project_name'] = $project['project_name'];
$data['create_user_name'] = $admin['name'];
})
->toArray();
}
/**
* @notes 获取工程监理--开工策划数量
* @return int
* @author likeadmin
* @date 2024/02/23 17:43
*/
public function count(): int
{
return SupervisionConstructionPlanning::where($this->searchWhere)->count();
}
}

View File

@ -0,0 +1,85 @@
<?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\supervision_prepare;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\auth\Admin;
use app\common\model\supervision_prepare\SupervisionContractDisclosure;
use app\common\lists\ListsSearchInterface;
use app\common\model\supervision_project\SupervisionProject;
/**
* 工程监理--监理合同交底列表
* Class SupervisionContractDisclosureLists
* @package app\adminapi\listssupervision_prepare
*/
class SupervisionContractDisclosureLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/23 17:19
*/
public function setSearch(): array
{
return [
'=' => ['project_id'],
'%like%' => ['doc_name'],
];
}
/**
* @notes 获取工程监理--监理合同交底列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author likeadmin
* @date 2024/02/23 17:19
*/
public function lists(): array
{
return SupervisionContractDisclosure::withoutField('update_time,delete_time')->where($this->searchWhere)
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()->each(function($data){
$project = SupervisionProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
$data['project_name'] = $project['project_name'];
$data['create_user_name'] = $admin['name'];
})
->toArray();
}
/**
* @notes 获取工程监理--监理合同交底数量
* @return int
* @author likeadmin
* @date 2024/02/23 17:19
*/
public function count(): int
{
return SupervisionContractDisclosure::where($this->searchWhere)->count();
}
}

View File

@ -0,0 +1,86 @@
<?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\supervision_prepare;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\auth\Admin;
use app\common\model\supervision_prepare\SupervisionPlanning;
use app\common\lists\ListsSearchInterface;
use app\common\model\supervision_project\SupervisionProject;
/**
* 工程监理--监理规划列表
* Class SupervisionPlanningLists
* @package app\adminapi\listssupervision_prepare
*/
class SupervisionPlanningLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/23 16:45
*/
public function setSearch(): array
{
return [
'=' => ['project_id', 'approval_type'],
'%like%' => ['approval_user', 'scheme_name', 'create_user'],
];
}
/**
* @notes 获取工程监理--监理规划列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author likeadmin
* @date 2024/02/23 16:45
*/
public function lists(): array
{
return SupervisionPlanning::withoutField('update_time,delete_time')->where($this->searchWhere)
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()->each(function($data){
$project = SupervisionProject::field('project_name,project_manager')->where('id',$data['project_id'])->findOrEmpty();
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
$data['project_name'] = $project['project_name'];
$data['project_manager'] = $project['project_manager'];
$data['create_user_name'] = $admin['name'];
$data['approval_type_text'] = $data->approval_type_text;
})
->toArray();
}
/**
* @notes 获取工程监理--监理规划数量
* @return int
* @author likeadmin
* @date 2024/02/23 16:45
*/
public function count(): int
{
return SupervisionPlanning::where($this->searchWhere)->count();
}
}

View File

@ -0,0 +1,82 @@
<?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\supervision_project;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\supervision_project\SupervisionMonitoringEquipment;
use app\common\model\supervision_project\SupervisionMonitoringEquipmentDetail;
use app\common\lists\ListsSearchInterface;
/**
* 工程监理--监控设备明细列表
* Class SupervisionMonitoringEquipmentDetailLists
* @package app\adminapi\listssupervision_project
*/
class SupervisionMonitoringEquipmentDetailLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function setSearch(): array
{
return [
'=' => ['device_id'],
'%like%' => ['name'],
];
}
/**
* @notes 获取工程监理--监控设备明细列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function lists(): array
{
return SupervisionMonitoringEquipmentDetail::withoutField('create_time,update_time,delete_time')->where($this->searchWhere)
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()->each(function($data){
$device = SupervisionMonitoringEquipment::field('device_name')->where('id',$data['device_id'])->findOrEmpty();
$data['device_name'] = $device['device_name'];
$data['is_show_text'] = $data->is_show_text;
})
->toArray();
}
/**
* @notes 获取工程监理--监控设备明细数量
* @return int
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function count(): int
{
return SupervisionMonitoringEquipmentDetail::where($this->searchWhere)->count();
}
}

View File

@ -0,0 +1,82 @@
<?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\supervision_project;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\supervision_project\SupervisionMonitoringEquipment;
use app\common\lists\ListsSearchInterface;
use app\common\model\supervision_project\SupervisionProject;
/**
* 工程监理--监控设备信息列表
* Class SupervisionMonitoringEquipmentLists
* @package app\adminapi\listssupervision_project
*/
class SupervisionMonitoringEquipmentLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function setSearch(): array
{
return [
'=' => ['project_id', 'device_type', 'number'],
'%like%' => ['device_name', 'device_sn'],
];
}
/**
* @notes 获取工程监理--监控设备信息列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function lists(): array
{
return SupervisionMonitoringEquipment::withoutField('create_time,update_time,delete_time')->where($this->searchWhere)
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()->each(function($data){
$project = SupervisionProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
$data['project_name'] = $project['project_name'];
$data['device_type_text'] = $data->device_type_text;
})
->toArray();
}
/**
* @notes 获取工程监理--监控设备信息数量
* @return int
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function count(): int
{
return SupervisionMonitoringEquipment::where($this->searchWhere)->count();
}
}

View File

@ -0,0 +1,85 @@
<?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\supervision_project;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\supervision_project\SupervisionParticipatingUnits;
use app\common\model\supervision_project\SupervisionParticipatingUnitsContacts;
use app\common\lists\ListsSearchInterface;
use app\common\model\supervision_project\SupervisionProject;
/**
* 工程监理--参建单位联系人列表
* Class SupervisionParticipatingUnitsContactsLists
* @package app\adminapi\listssupervision_project
*/
class SupervisionParticipatingUnitsContactsLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function setSearch(): array
{
return [
'=' => ['unit_id'],
'%like%' => ['name', 'duties', 'mobile'],
];
}
/**
* @notes 获取工程监理--参建单位联系人列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function lists(): array
{
return SupervisionParticipatingUnitsContacts::withoutField('create_time,update_time,delete_time')->where($this->searchWhere)
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()->each(function($data){
$unit = SupervisionParticipatingUnits::field('project_id,unit_name,unit_type')->where('id',$data['unit_id'])->findOrEmpty();
$project = SupervisionProject::field('project_name')->where('id',$unit['project_id'])->findOrEmpty();
$data['unit_name'] = $unit['unit_name'];
$data['unit_type'] = $unit->unit_type_text;
$data['project_name'] = $project['project_name'];
})
->toArray();
}
/**
* @notes 获取工程监理--参建单位联系人数量
* @return int
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function count(): int
{
return SupervisionParticipatingUnitsContacts::where($this->searchWhere)->count();
}
}

View File

@ -0,0 +1,82 @@
<?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\supervision_project;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\supervision_project\SupervisionParticipatingUnits;
use app\common\lists\ListsSearchInterface;
use app\common\model\supervision_project\SupervisionProject;
/**
* 工程监理--参建单位列表
* Class SupervisionParticipatingUnitsLists
* @package app\adminapi\listssupervision_project
*/
class SupervisionParticipatingUnitsLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function setSearch(): array
{
return [
'=' => ['project_id', 'unit_type'],
'%like%' => ['unit_name', 'qualification_grade'],
];
}
/**
* @notes 获取工程监理--参建单位列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function lists(): array
{
return SupervisionParticipatingUnits::withoutField('create_time,update_time,delete_time')->where($this->searchWhere)
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()->each(function($data){
$project = SupervisionProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
$data['project_name'] = $project['project_name'];
$data['unit_type_text'] = $data->unit_type_text;
})
->toArray();
}
/**
* @notes 获取工程监理--参建单位数量
* @return int
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function count(): int
{
return SupervisionParticipatingUnits::where($this->searchWhere)->count();
}
}

View File

@ -0,0 +1,83 @@
<?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\supervision_project;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\supervision_project\SupervisionProject;
use app\common\lists\ListsSearchInterface;
/**
* 工程监理--监理项目信息列表
* Class SupervisionProjectLists
* @package app\adminapi\listssupervision_project
*/
class SupervisionProjectLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/23 09:52
*/
public function setSearch(): array
{
return [
'=' => ['industry', 'nature', 'project_level', 'engineering_status'],
'%like%' => ['project_name', 'project_code', 'build_unit'],
];
}
/**
* @notes 获取工程监理--监理项目信息列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author likeadmin
* @date 2024/02/23 09:52
*/
public function lists(): array
{
return SupervisionProject::withoutField('create_user,create_time,update_time,delete_time')->where($this->searchWhere)
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()->each(function($data){
$data['industry_text'] = $data->industry_text;
$data['nature_text'] = $data->nature_text;
$data['build_area_text'] = $data->build_area_text;
$data['project_level_text'] = $data->project_level_text;
$data['engineering_status_text'] = $data->industry_text;
})
->toArray();
}
/**
* @notes 获取工程监理--监理项目信息数量
* @return int
* @author likeadmin
* @date 2024/02/23 09:52
*/
public function count(): int
{
return SupervisionProject::where($this->searchWhere)->count();
}
}

View File

@ -0,0 +1,119 @@
<?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\supervision_prepare;
use app\common\model\auth\Admin;
use app\common\model\supervision_prepare\SupervisionConstructionPlanning;
use app\common\logic\BaseLogic;
use app\common\model\supervision_project\SupervisionProject;
use think\facade\Db;
/**
* 工程监理--开工策划逻辑
* Class SupervisionConstructionPlanningLogic
* @package app\adminapi\logic\supervision_prepare
*/
class SupervisionConstructionPlanningLogic extends BaseLogic
{
/**
* @notes 添加工程监理--开工策划
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 17:43
*/
public static function add(array $params,$admin_id): bool
{
Db::startTrans();
try {
SupervisionConstructionPlanning::create([
'project_id' => $params['project_id'],
'doc_name' => $params['doc_name'],
'doc_desc' => $params['doc_desc'],
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
'create_user' => $admin_id,
]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 编辑工程监理--开工策划
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 17:43
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
SupervisionConstructionPlanning::where('id', $params['id'])->update([
'project_id' => $params['project_id'],
'doc_name' => $params['doc_name'],
'doc_desc' => $params['doc_desc'],
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
'update_time' => time(),
]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 删除工程监理--开工策划
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 17:43
*/
public static function delete(array $params): bool
{
return SupervisionConstructionPlanning::destroy($params['id']);
}
/**
* @notes 获取工程监理--开工策划详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/23 17:43
*/
public static function detail($params): array
{
$data = SupervisionConstructionPlanning::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
$project = SupervisionProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
$data['project_name'] = $project['project_name'];
$data['create_user_name'] = $admin['name'];
return $data->toArray();
}
}

View File

@ -0,0 +1,119 @@
<?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\supervision_prepare;
use app\common\model\auth\Admin;
use app\common\model\supervision_prepare\SupervisionContractDisclosure;
use app\common\logic\BaseLogic;
use app\common\model\supervision_project\SupervisionProject;
use think\facade\Db;
/**
* 工程监理--监理合同交底逻辑
* Class SupervisionContractDisclosureLogic
* @package app\adminapi\logic\supervision_prepare
*/
class SupervisionContractDisclosureLogic extends BaseLogic
{
/**
* @notes 添加工程监理--监理合同交底
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 17:19
*/
public static function add(array $params,$admin_id): bool
{
Db::startTrans();
try {
SupervisionContractDisclosure::create([
'project_id' => $params['project_id'],
'doc_name' => $params['doc_name'],
'doc_desc' => $params['doc_desc'],
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
'create_user' => $admin_id,
]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 编辑工程监理--监理合同交底
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 17:19
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
SupervisionContractDisclosure::where('id', $params['id'])->update([
'project_id' => $params['project_id'],
'doc_name' => $params['doc_name'],
'doc_desc' => $params['doc_desc'],
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
'update_time' => time(),
]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 删除工程监理--监理合同交底
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 17:19
*/
public static function delete(array $params): bool
{
return SupervisionContractDisclosure::destroy($params['id']);
}
/**
* @notes 获取工程监理--监理合同交底详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/23 17:19
*/
public static function detail($params): array
{
$data = SupervisionContractDisclosure::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
$project = SupervisionProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
$data['project_name'] = $project['project_name'];
$data['create_user_name'] = $admin['name'];
return $data->toArray();
}
}

View File

@ -0,0 +1,127 @@
<?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\supervision_prepare;
use app\common\model\auth\Admin;
use app\common\model\supervision_prepare\SupervisionPlanning;
use app\common\logic\BaseLogic;
use app\common\model\supervision_project\SupervisionProject;
use think\facade\Db;
/**
* 工程监理--监理规划逻辑
* Class SupervisionPlanningLogic
* @package app\adminapi\logic\supervision_prepare
*/
class SupervisionPlanningLogic extends BaseLogic
{
/**
* @notes 添加工程监理--监理规划
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 16:45
*/
public static function add(array $params,$admin_id): bool
{
Db::startTrans();
try {
SupervisionPlanning::create([
'project_id' => $params['project_id'],
'approval_type' => $params['approval_type'],
'approval_user' => $params['approval_user'],
'scheme_name' => $params['scheme_name'],
'approval_content' => $params['approval_content'],
'remark' => $params['remark'],
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
'create_user' => $admin_id,
]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 编辑工程监理--监理规划
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 16:45
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
SupervisionPlanning::where('id', $params['id'])->update([
'project_id' => $params['project_id'],
'approval_type' => $params['approval_type'],
'approval_user' => $params['approval_user'],
'scheme_name' => $params['scheme_name'],
'approval_content' => $params['approval_content'],
'remark' => $params['remark'],
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
'update_time' => time(),
]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 删除工程监理--监理规划
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 16:45
*/
public static function delete(array $params): bool
{
return SupervisionPlanning::destroy($params['id']);
}
/**
* @notes 获取工程监理--监理规划详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/23 16:45
*/
public static function detail($params): array
{
$data = SupervisionPlanning::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
$project = SupervisionProject::field('project_name,project_manager')->where('id',$data['project_id'])->findOrEmpty();
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
$data['project_name'] = $project['project_name'];
$data['project_manager'] = $project['project_manager'];
$data['create_user_name'] = $admin['name'];
$data['approval_type_text'] = $data->approval_type_text;
return $data->toArray();
}
}

View File

@ -0,0 +1,114 @@
<?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\supervision_project;
use app\common\model\supervision_project\SupervisionMonitoringEquipment;
use app\common\model\supervision_project\SupervisionMonitoringEquipmentDetail;
use app\common\logic\BaseLogic;
use think\facade\Db;
/**
* 工程监理--监控设备明细逻辑
* Class SupervisionMonitoringEquipmentDetailLogic
* @package app\adminapi\logic\supervision_project
*/
class SupervisionMonitoringEquipmentDetailLogic extends BaseLogic
{
/**
* @notes 添加工程监理--监控设备明细
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 15:20
*/
public static function add(array $params): bool
{
Db::startTrans();
try {
SupervisionMonitoringEquipmentDetail::create([
'device_id' => $params['device_id'],
'name' => $params['name'],
'is_show' => $params['is_show'],
]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 编辑工程监理--监控设备明细
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 15:20
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
SupervisionMonitoringEquipmentDetail::where('id', $params['id'])->update([
'device_id' => $params['device_id'],
'name' => $params['name'],
'is_show' => $params['is_show'],
'update_time' => time(),
]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 删除工程监理--监控设备明细
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 15:20
*/
public static function delete(array $params): bool
{
return SupervisionMonitoringEquipmentDetail::destroy($params['id']);
}
/**
* @notes 获取工程监理--监控设备明细详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/23 15:20
*/
public static function detail($params): array
{
$data = SupervisionMonitoringEquipmentDetail::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
$device = SupervisionMonitoringEquipment::field('device_name')->where('id',$data['device_id'])->findOrEmpty();
$data['device_name'] = $device['device_name'];
$data['is_show_text'] = $data->is_show_text;
return $data->toArray();
}
}

View File

@ -0,0 +1,148 @@
<?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\supervision_project;
use app\common\model\supervision_project\SupervisionMonitoringEquipment;
use app\common\logic\BaseLogic;
use app\common\model\supervision_project\SupervisionMonitoringEquipmentDetail;
use app\common\model\supervision_project\SupervisionProject;
use think\facade\Db;
/**
* 工程监理--监控设备信息逻辑
* Class SupervisionMonitoringEquipmentLogic
* @package app\adminapi\logic\supervision_project
*/
class SupervisionMonitoringEquipmentLogic extends BaseLogic
{
/**
* @notes 添加工程监理--监控设备信息
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 15:20
*/
public static function add(array $params): bool
{
Db::startTrans();
try {
$res = SupervisionMonitoringEquipment::create([
'project_id' => $params['project_id'],
'device_name' => $params['device_name'],
'device_type' => $params['device_type'],
'device_sn' => $params['device_sn'],
'number' => $params['number'],
'remark' => $params['remark'],
]);
if(!empty($params['devices'])){
foreach($params['devices'] as $v){
SupervisionMonitoringEquipmentDetail::create([
'device_id' => $res->id,
'name' => $v['name'],
'is_show' => $v['is_show'],
]);
}
}
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 编辑工程监理--监控设备信息
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 15:20
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
SupervisionMonitoringEquipment::where('id', $params['id'])->update([
'project_id' => $params['project_id'],
'device_name' => $params['device_name'],
'device_type' => $params['device_type'],
'device_sn' => $params['device_sn'],
'number' => $params['number'],
'remark' => $params['remark'],
'update_time' => time(),
]);
if(!empty($params['devices'])){
foreach($params['devices'] as $v){
if(!empty($v['id'])){
SupervisionMonitoringEquipmentDetail::where('id',$v['id'])->update([
'device_id' => $params['id'],
'name' => $v['name'],
'is_show' => $v['is_show'],
'update_time' => time(),
]);
}else{
SupervisionMonitoringEquipmentDetail::create([
'device_id' => $params['id'],
'name' => $v['name'],
'is_show' => $v['is_show'],
]);
}
}
}
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 删除工程监理--监控设备信息
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 15:20
*/
public static function delete(array $params): bool
{
return SupervisionMonitoringEquipment::destroy($params['id']);
}
/**
* @notes 获取工程监理--监控设备信息详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/23 15:20
*/
public static function detail($params): array
{
$data = SupervisionMonitoringEquipment::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
$project = SupervisionProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
$data['project_name'] = $project['project_name'];
$data['device_type_text'] = $data->device_type_text;
return $data->toArray();
}
}

View File

@ -0,0 +1,121 @@
<?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\supervision_project;
use app\common\model\supervision_project\SupervisionParticipatingUnits;
use app\common\model\supervision_project\SupervisionParticipatingUnitsContacts;
use app\common\logic\BaseLogic;
use think\facade\Db;
/**
* 工程监理--参建单位联系人逻辑
* Class SupervisionParticipatingUnitsContactsLogic
* @package app\adminapi\logic\supervision_project
*/
class SupervisionParticipatingUnitsContactsLogic extends BaseLogic
{
/**
* @notes 添加工程监理--参建单位联系人
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 13:40
*/
public static function add(array $params): bool
{
Db::startTrans();
try {
SupervisionParticipatingUnitsContacts::create([
'unit_id' => $params['unit_id'],
'name' => $params['name'],
'duties' => $params['duties'],
'telephone' => $params['telephone'],
'mobile' => $params['mobile'],
'email' => $params['email'],
'fax' => $params['fax'],
]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 编辑工程监理--参建单位联系人
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 13:40
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
SupervisionParticipatingUnitsContacts::where('id', $params['id'])->update([
'unit_id' => $params['unit_id'],
'name' => $params['name'],
'duties' => $params['duties'],
'telephone' => $params['telephone'],
'mobile' => $params['mobile'],
'email' => $params['email'],
'fax' => $params['fax'],
'update_time' => time(),
]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 删除工程监理--参建单位联系人
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 13:40
*/
public static function delete(array $params): bool
{
return SupervisionParticipatingUnitsContacts::destroy($params['id']);
}
/**
* @notes 获取工程监理--参建单位联系人详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/23 13:40
*/
public static function detail($params): array
{
$data = SupervisionParticipatingUnitsContacts::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
$unit = SupervisionParticipatingUnits::field('unit_name')->where('id',$data['unit_id'])->findOrEmpty();
$data['unit_name'] = $unit['unit_name'];
return $data->toArray();
}
}

View File

@ -0,0 +1,159 @@
<?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\supervision_project;
use app\common\model\supervision_project\SupervisionParticipatingUnits;
use app\common\logic\BaseLogic;
use app\common\model\supervision_project\SupervisionParticipatingUnitsContacts;
use app\common\model\supervision_project\SupervisionProject;
use think\facade\Db;
/**
* 工程监理--参建单位逻辑
* Class SupervisionParticipatingUnitsLogic
* @package app\adminapi\logic\supervision_project
*/
class SupervisionParticipatingUnitsLogic extends BaseLogic
{
/**
* @notes 添加工程监理--参建单位
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 13:40
*/
public static function add(array $params): bool
{
Db::startTrans();
try {
$res = SupervisionParticipatingUnits::create([
'project_id' => $params['project_id'],
'unit_name' => $params['unit_name'],
'unit_type' => $params['unit_type'],
'qualification_grade' => $params['qualification_grade'],
'telephone' => $params['telephone'],
'duty' => $params['duty'],
]);
if(!empty($params['contacts'])){
foreach($params['contacts'] as $v){
SupervisionParticipatingUnitsContacts::create([
'unit_id' => $res->id,
'name' => $v['name'],
'duties' => $v['duties'],
'telephone' => $v['telephone'],
'mobile' => $v['mobile'],
'email' => $v['email'],
'fax' => $v['fax'],
]);
}
}
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 编辑工程监理--参建单位
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 13:40
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
SupervisionParticipatingUnits::where('id', $params['id'])->update([
'project_id' => $params['project_id'],
'unit_name' => $params['unit_name'],
'unit_type' => $params['unit_type'],
'qualification_grade' => $params['qualification_grade'],
'telephone' => $params['telephone'],
'duty' => $params['duty'],
'update_time' => time(),
]);
if(!empty($params['contacts'])){
foreach($params['contacts'] as $v){
if(!empty($v['id'])){
SupervisionParticipatingUnitsContacts::where('id',$v['id'])->update([
'unit_id' => $params['id'],
'name' => $v['name'],
'duties' => $v['duties'],
'telephone' => $v['telephone'],
'mobile' => $v['mobile'],
'email' => $v['email'],
'fax' => $v['fax'],
'update_time' => time(),
]);
}else{
SupervisionParticipatingUnitsContacts::create([
'unit_id' => $params['id'],
'name' => $v['name'],
'duties' => $v['duties'],
'telephone' => $v['telephone'],
'mobile' => $v['mobile'],
'email' => $v['email'],
'fax' => $v['fax'],
]);
}
}
}
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 删除工程监理--参建单位
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 13:40
*/
public static function delete(array $params): bool
{
return SupervisionParticipatingUnits::destroy($params['id']);
}
/**
* @notes 获取工程监理--参建单位详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/23 13:40
*/
public static function detail($params): array
{
$data = SupervisionParticipatingUnits::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
$project = SupervisionProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
$data['project_name'] = $project['project_name'];
$data['unit_type_text'] = $data->unit_type_text;
return $data->toArray();
}
}

View File

@ -0,0 +1,166 @@
<?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\supervision_project;
use app\common\model\auth\Admin;
use app\common\model\supervision_project\SupervisionProject;
use app\common\logic\BaseLogic;
use think\facade\Db;
/**
* 工程监理--监理项目信息逻辑
* Class SupervisionProjectLogic
* @package app\adminapi\logic\supervision_project
*/
class SupervisionProjectLogic extends BaseLogic
{
/**
* @notes 添加工程监理--监理项目信息
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 09:52
*/
public static function add(array $params,$admin_id): bool
{
Db::startTrans();
try {
SupervisionProject::create([
'project_name' => $params['project_name'],
'project_code' => data_unique_code('JLXM'),
'industry' => $params['industry'],
'nature' => $params['nature'],
'build_unit' => $params['build_unit'],
'build_area' => $params['build_area'],
'address' => $params['address'],
'project_level' => $params['project_level'],
'total_investment' => $params['total_investment'],
'initiation_date' => $params['initiation_date'],
'contract' => $params['contract'],
'contract_amount' => $params['contract_amount'],
'actual_start_date' => !empty($params['actual_start_date']) ? strtotime($params['actual_start_date']) : 0,
'actual_end_date' => !empty($params['actual_end_date']) ? strtotime($params['actual_end_date']) : 0,
'planned_start_date' => !empty($params['planned_start_date']) ? strtotime($params['planned_start_date']) : 0,
'planned_end_date' => !empty($params['planned_end_date']) ? strtotime($params['planned_end_date']) : 0,
'contract_content' => $params['contract_content'],
'project_overview' => $params['project_overview'],
'project_requirements' => $params['project_requirements'],
'remark' => $params['remark'],
'supervision_department' => $params['supervision_department'],
'implementation_department' => $params['implementation_department'],
'project_department' => $params['project_department'],
'engineering_status' => $params['engineering_status'],
'project_manager' => $params['project_manager'],
'part_a_unit' => $params['part_a_unit'],
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
'create_user' => $admin_id,
]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 编辑工程监理--监理项目信息
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 09:52
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
SupervisionProject::where('id', $params['id'])->update([
'project_name' => $params['project_name'],
'industry' => $params['industry'],
'nature' => $params['nature'],
'build_unit' => $params['build_unit'],
'build_area' => $params['build_area'],
'address' => $params['address'],
'project_level' => $params['project_level'],
'total_investment' => $params['total_investment'],
'initiation_date' => $params['initiation_date'],
'contract' => $params['contract'],
'contract_amount' => $params['contract_amount'],
'actual_start_date' => !empty($params['actual_start_date']) ? strtotime($params['actual_start_date']) : 0,
'actual_end_date' => !empty($params['actual_end_date']) ? strtotime($params['actual_end_date']) : 0,
'planned_start_date' => !empty($params['planned_start_date']) ? strtotime($params['planned_start_date']) : 0,
'planned_end_date' =>!empty($params['planned_end_date']) ? strtotime($params['planned_end_date']) : 0,
'contract_content' => $params['contract_content'],
'project_overview' => $params['project_overview'],
'project_requirements' => $params['project_requirements'],
'remark' => $params['remark'],
'supervision_department' => $params['supervision_department'],
'implementation_department' => $params['implementation_department'],
'project_department' => $params['project_department'],
'engineering_status' => $params['engineering_status'],
'project_manager' => $params['project_manager'],
'part_a_unit' => $params['part_a_unit'],
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
'update_time' => time(),
]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 删除工程监理--监理项目信息
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/23 09:52
*/
public static function delete(array $params): bool
{
return SupervisionProject::destroy($params['id']);
}
/**
* @notes 获取工程监理--监理项目信息详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/23 09:52
*/
public static function detail($params): array
{
$data = SupervisionProject::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
$data['create_user_name'] = $admin['name'];
$data['industry_text'] = $data->industry_text;
$data['nature_text'] = $data->nature_text;
$data['build_area_text'] = $data->build_area_text;
$data['project_level_text'] = $data->project_level_text;
$data['engineering_status_text'] = $data->engineering_status_text;
return $data->toArray();
}
}

View File

@ -0,0 +1,126 @@
<?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\supervision_prepare;
use app\common\model\supervision_prepare\SupervisionConstructionPlanning;
use app\common\model\supervision_project\SupervisionProject;
use app\common\validate\BaseValidate;
/**
* 工程监理--开工策划验证器
* Class SupervisionConstructionPlanningValidate
* @package app\adminapi\validate\supervision_prepare
*/
class SupervisionConstructionPlanningValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require|checkData',
'project_id' => 'require|checkProject',
'doc_name' => 'require',
'annex' => 'checkAnnex',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'project_id' => '项目id',
'doc_name' => '文档名称',
'doc_desc' => '文档简介',
];
/**
* @notes 添加场景
* @return SupervisionConstructionPlanningValidate
* @author likeadmin
* @date 2024/02/23 17:43
*/
public function sceneAdd()
{
return $this->remove('id',true);
}
/**
* @notes 编辑场景
* @return SupervisionConstructionPlanningValidate
* @author likeadmin
* @date 2024/02/23 17:43
*/
public function sceneEdit()
{}
/**
* @notes 删除场景
* @return SupervisionConstructionPlanningValidate
* @author likeadmin
* @date 2024/02/23 17:43
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupervisionConstructionPlanningValidate
* @author likeadmin
* @date 2024/02/23 17:43
*/
public function sceneDetail()
{
return $this->only(['id']);
}
public function checkData($value): bool|string
{
$data = SupervisionConstructionPlanning::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '数据不存在';
}
return true;
}
public function checkProject($value): bool|string
{
$data = SupervisionProject::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '项目信息不存在';
}
return true;
}
public function checkAnnex($value): bool|string
{
if(!empty($value) && $value != '' && !is_array($value)){
return '附件格式错误';
}
return true;
}
}

View File

@ -0,0 +1,126 @@
<?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\supervision_prepare;
use app\common\model\supervision_prepare\SupervisionContractDisclosure;
use app\common\model\supervision_project\SupervisionProject;
use app\common\validate\BaseValidate;
/**
* 工程监理--监理合同交底验证器
* Class SupervisionContractDisclosureValidate
* @package app\adminapi\validate\supervision_prepare
*/
class SupervisionContractDisclosureValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require|checkData',
'project_id' => 'require|checkProject',
'doc_name' => 'require',
'annex' => 'checkAnnex',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'project_id' => '项目id',
'doc_name' => '文档名称',
'doc_desc' => '文档简介',
];
/**
* @notes 添加场景
* @return SupervisionContractDisclosureValidate
* @author likeadmin
* @date 2024/02/23 17:19
*/
public function sceneAdd()
{
return $this->remove('id',true);
}
/**
* @notes 编辑场景
* @return SupervisionContractDisclosureValidate
* @author likeadmin
* @date 2024/02/23 17:19
*/
public function sceneEdit()
{}
/**
* @notes 删除场景
* @return SupervisionContractDisclosureValidate
* @author likeadmin
* @date 2024/02/23 17:19
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupervisionContractDisclosureValidate
* @author likeadmin
* @date 2024/02/23 17:19
*/
public function sceneDetail()
{
return $this->only(['id']);
}
public function checkData($value): bool|string
{
$data = SupervisionContractDisclosure::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '数据不存在';
}
return true;
}
public function checkProject($value): bool|string
{
$data = SupervisionProject::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '项目信息不存在';
}
return true;
}
public function checkAnnex($value): bool|string
{
if(!empty($value) && $value != '' && !is_array($value)){
return '附件格式错误';
}
return true;
}
}

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\validate\supervision_prepare;
use app\common\model\dict\DictData;
use app\common\model\supervision_prepare\SupervisionPlanning;
use app\common\model\supervision_project\SupervisionProject;
use app\common\validate\BaseValidate;
/**
* 工程监理--监理规划验证器
* Class SupervisionPlanningValidate
* @package app\adminapi\validate\supervision_prepare
*/
class SupervisionPlanningValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require|checkData',
'project_id' => 'require|checkProject',
'approval_type' => 'checkApprovalType',
'scheme_name' => 'require',
'approval_content' => 'require',
'annex' => 'checkAnnex',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'project_id' => '项目id',
'approval_type' => '专项审批类型',
'approval_user' => '评审人员',
'scheme_name' => '方案名称',
'approval_content' => '评审内容',
'remark' => '备注',
];
/**
* @notes 添加场景
* @return SupervisionPlanningValidate
* @author likeadmin
* @date 2024/02/23 16:45
*/
public function sceneAdd()
{
return $this->remove('id',true);
}
/**
* @notes 编辑场景
* @return SupervisionPlanningValidate
* @author likeadmin
* @date 2024/02/23 16:45
*/
public function sceneEdit()
{}
/**
* @notes 删除场景
* @return SupervisionPlanningValidate
* @author likeadmin
* @date 2024/02/23 16:45
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupervisionPlanningValidate
* @author likeadmin
* @date 2024/02/23 16:45
*/
public function sceneDetail()
{
return $this->only(['id']);
}
public function checkData($value): bool|string
{
$data = SupervisionPlanning::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '数据不存在';
}
return true;
}
public function checkProject($value){
$data = SupervisionProject::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '项目信息不存在';
}
return true;
}
public function checkApprovalType($value): bool|string
{
$dict = DictData::where('type_value','supervision_planning_approval_type')->column('value');
if(!in_array($value,$dict)){
return '专项审批类型数据值无效';
}
return true;
}
public function checkAnnex($value): bool|string
{
if(!empty($value) && $value != '' && !is_array($value)){
return '附件格式错误';
}
return true;
}
}

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\validate\supervision_project;
use app\common\model\supervision_project\SupervisionMonitoringEquipment;
use app\common\model\supervision_project\SupervisionMonitoringEquipmentDetail;
use app\common\validate\BaseValidate;
/**
* 工程监理--监控设备明细验证器
* Class SupervisionMonitoringEquipmentDetailValidate
* @package app\adminapi\validate\supervision_project
*/
class SupervisionMonitoringEquipmentDetailValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require|checkData',
'device_id' => 'require|checkDevice',
'name' => 'require',
'is_show' => 'require|in:0,1',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'device_id' => '设备信息id',
'name' => '设备名称',
'is_show' => '是否显示',
];
/**
* @notes 添加场景
* @return SupervisionMonitoringEquipmentDetailValidate
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function sceneAdd()
{
return $this->only(['device_id','name','is_show']);
}
/**
* @notes 编辑场景
* @return SupervisionMonitoringEquipmentDetailValidate
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function sceneEdit()
{
return $this->only(['id','device_id','name','is_show']);
}
/**
* @notes 删除场景
* @return SupervisionMonitoringEquipmentDetailValidate
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupervisionMonitoringEquipmentDetailValidate
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function sceneDetail()
{
return $this->only(['id']);
}
public function checkData($value): bool|string
{
$data = SupervisionMonitoringEquipmentDetail::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '数据不存在';
}
return true;
}
public function checkDevice($value): bool|string
{
$data = SupervisionMonitoringEquipment::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '监控设备信息不存在';
}
return true;
}
}

View File

@ -0,0 +1,151 @@
<?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\supervision_project;
use app\common\model\dict\DictData;
use app\common\model\supervision_project\SupervisionMonitoringEquipment;
use app\common\model\supervision_project\SupervisionMonitoringEquipmentDetail;
use app\common\model\supervision_project\SupervisionProject;
use app\common\validate\BaseValidate;
/**
* 工程监理--监控设备信息验证器
* Class SupervisionMonitoringEquipmentValidate
* @package app\adminapi\validate\supervision_project
*/
class SupervisionMonitoringEquipmentValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require|checkData',
'project_id' => 'require|checkProject',
'device_name' => 'require',
'device_type' => 'checkDeviceType',
'devices' => 'checkDevices'
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'project_id' => '项目id',
'device_name' => '监控设备名称',
'device_type' => '设备类型',
'device_sn' => '设备序列号',
'number' => '编号',
'remark' => '备注',
];
/**
* @notes 添加场景
* @return SupervisionMonitoringEquipmentValidate
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function sceneAdd()
{
return $this->remove('id',true);
}
/**
* @notes 编辑场景
* @return SupervisionMonitoringEquipmentValidate
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function sceneEdit()
{}
/**
* @notes 删除场景
* @return SupervisionMonitoringEquipmentValidate
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupervisionMonitoringEquipmentValidate
* @author likeadmin
* @date 2024/02/23 15:20
*/
public function sceneDetail()
{
return $this->only(['id']);
}
public function checkData($value): bool|string
{
$data = SupervisionMonitoringEquipment::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '数据不存在';
}
return true;
}
public function checkProject($value): bool|string
{
$data = SupervisionProject::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '项目信息不存在';
}
return true;
}
public function checkDeviceType($value): bool|string
{
$dict = DictData::where('type_value','device_type')->column('value');
if(!in_array($value,$dict)){
return '设备类型数据值无效';
}
return true;
}
public function checkDevices($value): bool|string
{
if(empty($value) || $value == '') return true;
if(!is_array($value)) return '设备列表数据格式错误';
foreach($value as $k=>$v){
if(isset($v['id']) && !empty($v['id'])){
$data = SupervisionMonitoringEquipmentDetail::where('id',$v['id'])->findOrEmpty();
if($data->isEmpty()){
return '第'.($k+1).'行设备信息不存在';
}
}
if(empty($v['name'])){
return '第'.($k+1).'行设备名称为空';
}
}
return true;
}
}

View File

@ -0,0 +1,123 @@
<?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\supervision_project;
use app\common\model\supervision_project\SupervisionParticipatingUnits;
use app\common\model\supervision_project\SupervisionParticipatingUnitsContacts;
use app\common\validate\BaseValidate;
/**
* 工程监理--参建单位联系人验证器
* Class SupervisionParticipatingUnitsContactsValidate
* @package app\adminapi\validate\supervision_project
*/
class SupervisionParticipatingUnitsContactsValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require|checkData',
'unit_id' => 'require|checkUnit',
'name' => 'require',
'mobile' => 'mobile',
'email' => 'email',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'unit_id' => '单位id',
'name' => '姓名',
'duties' => '职务',
'telephone' => '办公电话',
'mobile' => '手机号码',
'email' => '电子邮箱',
'fax' => '传真',
];
/**
* @notes 添加场景
* @return SupervisionParticipatingUnitsContactsValidate
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function sceneAdd()
{
return $this->remove('id',true);
}
/**
* @notes 编辑场景
* @return SupervisionParticipatingUnitsContactsValidate
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function sceneEdit()
{}
/**
* @notes 删除场景
* @return SupervisionParticipatingUnitsContactsValidate
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupervisionParticipatingUnitsContactsValidate
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function sceneDetail()
{
return $this->only(['id']);
}
public function checkData($value): bool|string
{
$data = SupervisionParticipatingUnitsContacts::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '数据不存在';
}
return true;
}
public function checkUnit($value): bool|string
{
$data = SupervisionParticipatingUnits::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '参建单位信息不存在';
}
return true;
}
}

View File

@ -0,0 +1,151 @@
<?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\supervision_project;
use app\common\model\dict\DictData;
use app\common\model\supervision_project\SupervisionParticipatingUnits;
use app\common\model\supervision_project\SupervisionParticipatingUnitsContacts;
use app\common\model\supervision_project\SupervisionProject;
use app\common\validate\BaseValidate;
/**
* 工程监理--参建单位验证器
* Class SupervisionParticipatingUnitsValidate
* @package app\adminapi\validate\supervision_project
*/
class SupervisionParticipatingUnitsValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require|checkData',
'project_id' => 'require|checkProject',
'unit_name' => 'require',
'unit_type' => 'checkUnitType',
'contacts' => 'checkContacts',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'project_id' => '项目id',
'unit_name' => '单位名称',
'unit_type' => '单位类别',
'qualification_grade' => '资质等级',
'telephone' => '联系电话',
'duty' => '责任范围',
];
/**
* @notes 添加场景
* @return SupervisionParticipatingUnitsValidate
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function sceneAdd()
{
return $this->remove('id',true);
}
/**
* @notes 编辑场景
* @return SupervisionParticipatingUnitsValidate
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function sceneEdit()
{}
/**
* @notes 删除场景
* @return SupervisionParticipatingUnitsValidate
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupervisionParticipatingUnitsValidate
* @author likeadmin
* @date 2024/02/23 13:40
*/
public function sceneDetail()
{
return $this->only(['id']);
}
public function checkData($value): bool|string
{
$data = SupervisionParticipatingUnits::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '数据不存在';
}
return true;
}
public function checkProject($value): bool|string
{
$data = SupervisionProject::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '项目信息不存在';
}
return true;
}
public function checkUnitType($value): bool|string
{
$dict = DictData::where('type_value','unit_type')->column('value');
if(!in_array($value,$dict)){
return '单位类别数据值无效';
}
return true;
}
public function checkContacts($value): bool|string
{
if(empty($value) || $value == '') return true;
if(!is_array($value)) return '联系人数据格式错误';
foreach($value as $k=>$v){
if(isset($v['id']) && !empty($v['id'])){
$data = SupervisionParticipatingUnitsContacts::where('id',$v['id'])->findOrEmpty();
if($data->isEmpty()){
return '第'.($k+1).'行联系人信息不存在';
}
}
if(empty($v['name'])){
return '第'.($k+1).'行联系人姓名为空';
}
}
return true;
}
}

View File

@ -0,0 +1,199 @@
<?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\supervision_project;
use app\common\model\dict\DictData;
use app\common\model\supervision_project\SupervisionProject;
use app\common\validate\BaseValidate;
/**
* 工程监理--监理项目信息验证器
* Class SupervisionProjectValidate
* @package app\adminapi\validate\supervision_project
*/
class SupervisionProjectValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require|checkData',
'project_name' => 'require',
'industry' => 'checkIndustry',
'nature' => 'checkNature',
'build_area' => 'checkBuildArea',
'project_level' => 'checkProjectLevel',
'total_investment' => 'require|float|gt:0',
'initiation_date' => 'dateFormat:Y-m-d',
'contract_amount' => 'float|egt:0',
'actual_start_date' => 'dateFormat:Y-m-d',
'actual_end_date' => 'dateFormat:Y-m-d',
'planned_start_date' => 'dateFormat:Y-m-d',
'planned_end_date' => 'dateFormat:Y-m-d',
'supervision_department' => 'require',
'engineering_status' => 'checkEngineeringStatus',
'annex' => 'checkAnnex',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'project_name' => '项目名称',
'project_code' => '项目编号',
'industry' => '行业',
'nature' => '性质',
'build_unit' => '建设单位',
'build_area' => '建设区域',
'address' => '项目地址',
'project_level' => '项目等级',
'total_investment' => '总投资(万元)',
'initiation_date' => '立项日期',
'contract' => '关联合同',
'contract_amount' => '合同金额',
'actual_start_date' => '实际开工日期',
'actual_end_date' => '实际竣工日期',
'planned_start_date' => '计划开工日期',
'planned_end_date' => '计划竣工日期',
'contract_content' => '合同服务内容',
'project_overview' => '项目概况',
'project_requirements' => '项目要求',
'remark' => '备注',
'supervision_department' => '监管部门',
'implementation_department' => '实施部门',
'project_department' => '项目部',
'engineering_status' => '工程状态',
'project_manager' => '项目负责人员',
'part_a_unit' => '甲方单位',
'create_user' => '创建人',
];
/**
* @notes 添加场景
* @return SupervisionProjectValidate
* @author likeadmin
* @date 2024/02/23 09:52
*/
public function sceneAdd()
{
return $this->remove('id',true);
}
/**
* @notes 编辑场景
* @return SupervisionProjectValidate
* @author likeadmin
* @date 2024/02/23 09:52
*/
public function sceneEdit()
{}
/**
* @notes 删除场景
* @return SupervisionProjectValidate
* @author likeadmin
* @date 2024/02/23 09:52
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupervisionProjectValidate
* @author likeadmin
* @date 2024/02/23 09:52
*/
public function sceneDetail()
{
return $this->only(['id']);
}
public function checkData($value): bool|string
{
$data = SupervisionProject::where('id',$value)->findOrEmpty();
if($data->isEmpty()){
return '数据不存在';
}
return true;
}
public function checkIndustry($value): bool|string
{
$dict = DictData::where('type_value','supervision_project_industry')->column('value');
if(!in_array($value,$dict)){
return '行业数据值无效';
}
return true;
}
public function checkNature($value): bool|string
{
$dict = DictData::where('type_value','supervision_project_nature')->column('value');
if(!in_array($value,$dict)){
return '性质数据值无效';
}
return true;
}
public function checkBuildArea($value): bool|string
{
$dict = DictData::where('type_value','supervision_project_build_area')->column('value');
if(!in_array($value,$dict)){
return '建设区域数据值无效';
}
return true;
}
public function checkProjectLevel($value): bool|string
{
$dict = DictData::where('type_value','supervision_project_level')->column('value');
if(!in_array($value,$dict)){
return '项目等级数据值无效';
}
return true;
}
public function checkEngineeringStatus($value): bool|string
{
$dict = DictData::where('type_value','supervision_project_status')->column('value');
if(!in_array($value,$dict)){
return '工程状态数据值无效';
}
return true;
}
public function checkAnnex($value): bool|string
{
if(!empty($value) && $value != '' && !is_array($value)){
return '附件格式错误';
}
return true;
}
}

View File

@ -0,0 +1,37 @@
<?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\supervision_prepare;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
/**
* 工程监理--开工策划模型
* Class SupervisionConstructionPlanning
* @package app\common\model\supervision_prepare
*/
class SupervisionConstructionPlanning extends BaseModel
{
use SoftDelete;
protected $name = 'supervision_construction_planning';
protected $deleteTime = 'delete_time';
public function getAnnexAttr($value)
{
return !empty($value) ? json_decode($value,true) : '';
}
}

View File

@ -0,0 +1,37 @@
<?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\supervision_prepare;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
/**
* 工程监理--监理合同交底模型
* Class SupervisionContractDisclosure
* @package app\common\model\supervision_prepare
*/
class SupervisionContractDisclosure extends BaseModel
{
use SoftDelete;
protected $name = 'supervision_contract_disclosure';
protected $deleteTime = 'delete_time';
public function getAnnexAttr($value)
{
return !empty($value) ? json_decode($value,true) : '';
}
}

View File

@ -0,0 +1,43 @@
<?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\supervision_prepare;
use app\common\model\BaseModel;
use app\common\model\dict\DictData;
use think\model\concern\SoftDelete;
/**
* 工程监理--监理规划模型
* Class SupervisionPlanning
* @package app\common\model\supervision_prepare
*/
class SupervisionPlanning extends BaseModel
{
use SoftDelete;
protected $name = 'supervision_planning';
protected $deleteTime = 'delete_time';
public function getApprovalTypeTextAttr($value,$data){
$dict = DictData::where('type_value','supervision_planning_approval_type')->column('name','value');
return !empty($data['approval_type']) ? $dict[$data['approval_type']] : '';
}
public function getAnnexAttr($value)
{
return !empty($value) ? json_decode($value,true) : '';
}
}

View File

@ -0,0 +1,38 @@
<?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\supervision_project;
use app\common\model\BaseModel;
use app\common\model\dict\DictData;
use think\model\concern\SoftDelete;
/**
* 工程监理--监控设备信息模型
* Class SupervisionMonitoringEquipment
* @package app\common\model\supervision_project
*/
class SupervisionMonitoringEquipment extends BaseModel
{
use SoftDelete;
protected $name = 'supervision_monitoring_equipment';
protected $deleteTime = 'delete_time';
public function getDeviceTypeTextAttr($value,$data){
$dict = DictData::where('type_value','device_type')->column('name','value');
return !empty($data['device_type']) ? $dict[$data['device_type']] : '';
}
}

View File

@ -0,0 +1,38 @@
<?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\supervision_project;
use app\common\model\BaseModel;
/**
* 工程监理--监控设备明细模型
* Class SupervisionMonitoringEquipmentDetail
* @package app\common\model\supervision_project
*/
class SupervisionMonitoringEquipmentDetail extends BaseModel
{
protected $name = 'supervision_monitoring_equipment_detail';
public function getIsShowTextAttr($value,$data): string
{
$arr = [0=>'否',1=>'是'];
return $arr[$data['is_show']];
}
}

View File

@ -0,0 +1,38 @@
<?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\supervision_project;
use app\common\model\BaseModel;
use app\common\model\dict\DictData;
use think\model\concern\SoftDelete;
/**
* 工程监理--参建单位模型
* Class SupervisionParticipatingUnits
* @package app\common\model\supervision_project
*/
class SupervisionParticipatingUnits extends BaseModel
{
use SoftDelete;
protected $name = 'supervision_participating_units';
protected $deleteTime = 'delete_time';
public function getUnitTypeTextAttr($value,$data){
$dict = DictData::where('type_value','unit_type')->column('name','value');
return !empty($data['unit_type']) ? $dict[$data['unit_type']] : '';
}
}

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\supervision_project;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
/**
* 工程监理--参建单位联系人模型
* Class SupervisionParticipatingUnitsContacts
* @package app\common\model\supervision_project
*/
class SupervisionParticipatingUnitsContacts extends BaseModel
{
use SoftDelete;
protected $name = 'supervision_participating_units_contacts';
protected $deleteTime = 'delete_time';
}

View File

@ -0,0 +1,84 @@
<?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\supervision_project;
use app\common\model\BaseModel;
use app\common\model\dict\DictData;
use think\model\concern\SoftDelete;
/**
* 工程监理--监理项目信息模型
* Class SupervisionProject
* @package app\common\model\supervision_project
*/
class SupervisionProject extends BaseModel
{
use SoftDelete;
protected $name = 'supervision_project';
protected $deleteTime = 'delete_time';
public function getIndustryTextAttr($value,$data){
$dict = DictData::where('type_value','supervision_project_industry')->column('name','value');
return !empty($data['industry']) ? $dict[$data['industry']] : '';
}
public function getNatureTextAttr($value,$data){
$dict = DictData::where('type_value','supervision_project_nature')->column('name','value');
return !empty($data['nature']) ? $dict[$data['nature']] : '';
}
public function getBuildAreaTextAttr($value,$data){
$dict = DictData::where('type_value','supervision_project_build_area')->column('name','value');
return !empty($data['build_area']) ? $dict[$data['build_area']] : '';
}
public function getProjectLevelTextAttr($value,$data){
$dict = DictData::where('type_value','supervision_project_level')->column('name','value');
return !empty($data['project_level']) ? $dict[$data['project_level']] : '';
}
public function getEngineeringStatusTextAttr($value,$data){
$dict = DictData::where('type_value','supervision_project_status')->column('name','value');
return !empty($data['engineering_status']) ? $dict[$data['engineering_status']] : '';
}
public function getActualStartDateAttr($value): string
{
return !empty($value) ? date('Y-m-d', $value) : '';
}
public function getActualEndDateAttr($value): string
{
return !empty($value) ? date('Y-m-d', $value) : '';
}
public function getPlannedStartDateAttr($value): string
{
return !empty($value) ? date('Y-m-d', $value) : '';
}
public function getPlannedEndDateAttr($value): string
{
return !empty($value) ? date('Y-m-d', $value) : '';
}
public function getAnnexAttr($value)
{
return !empty($value) ? json_decode($value,true) : '';
}
}