新增施工前准备模块内容

This commit is contained in:
weiz 2024-02-26 10:27:04 +08:00
parent 7abc2c8f99
commit 960b1e405a
25 changed files with 2376 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_const_prepare;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\supervision_const_prepare\SupervisionCommencementReportLists;
use app\adminapi\logic\supervision_const_prepare\SupervisionCommencementReportLogic;
use app\adminapi\validate\supervision_const_prepare\SupervisionCommencementReportValidate;
/**
* 工程监理--开工报告/开工令控制器
* Class SupervisionCommencementReportController
* @package app\adminapi\controller\supervision_const_prepare
*/
class SupervisionCommencementReportController extends BaseAdminController
{
/**
* @notes 获取工程监理--开工报告/开工令列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 10:17
*/
public function lists()
{
return $this->dataLists(new SupervisionCommencementReportLists());
}
/**
* @notes 添加工程监理--开工报告/开工令
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 10:17
*/
public function add()
{
$params = (new SupervisionCommencementReportValidate())->post()->goCheck('add');
$result = SupervisionCommencementReportLogic::add($params,$this->adminId);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(SupervisionCommencementReportLogic::getError());
}
/**
* @notes 编辑工程监理--开工报告/开工令
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 10:17
*/
public function edit()
{
$params = (new SupervisionCommencementReportValidate())->post()->goCheck('edit');
$result = SupervisionCommencementReportLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(SupervisionCommencementReportLogic::getError());
}
/**
* @notes 删除工程监理--开工报告/开工令
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 10:17
*/
public function delete()
{
$params = (new SupervisionCommencementReportValidate())->post()->goCheck('delete');
SupervisionCommencementReportLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取工程监理--开工报告/开工令详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 10:17
*/
public function detail()
{
$params = (new SupervisionCommencementReportValidate())->goCheck('detail');
$result = SupervisionCommencementReportLogic::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_const_prepare;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\supervision_const_prepare\SupervisionDesignDisclosureLists;
use app\adminapi\logic\supervision_const_prepare\SupervisionDesignDisclosureLogic;
use app\adminapi\validate\supervision_const_prepare\SupervisionDesignDisclosureValidate;
/**
* 设计交底与图纸会审控制器
* Class SupervisionDesignDisclosureController
* @package app\adminapi\controller\supervision_const_prepare
*/
class SupervisionDesignDisclosureController extends BaseAdminController
{
/**
* @notes 获取设计交底与图纸会审列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:36
*/
public function lists()
{
return $this->dataLists(new SupervisionDesignDisclosureLists());
}
/**
* @notes 添加设计交底与图纸会审
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:36
*/
public function add()
{
$params = (new SupervisionDesignDisclosureValidate())->post()->goCheck('add');
$result = SupervisionDesignDisclosureLogic::add($params,$this->adminId);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(SupervisionDesignDisclosureLogic::getError());
}
/**
* @notes 编辑设计交底与图纸会审
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:36
*/
public function edit()
{
$params = (new SupervisionDesignDisclosureValidate())->post()->goCheck('edit');
$result = SupervisionDesignDisclosureLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(SupervisionDesignDisclosureLogic::getError());
}
/**
* @notes 删除设计交底与图纸会审
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:36
*/
public function delete()
{
$params = (new SupervisionDesignDisclosureValidate())->post()->goCheck('delete');
SupervisionDesignDisclosureLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取设计交底与图纸会审详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:36
*/
public function detail()
{
$params = (new SupervisionDesignDisclosureValidate())->goCheck('detail');
$result = SupervisionDesignDisclosureLogic::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_const_prepare;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\supervision_const_prepare\SupervisionFirstMeetingLists;
use app\adminapi\logic\supervision_const_prepare\SupervisionFirstMeetingLogic;
use app\adminapi\validate\supervision_const_prepare\SupervisionFirstMeetingValidate;
/**
* 工程监理--第一次工地会议控制器
* Class SupervisionFirstMeetingController
* @package app\adminapi\controller\supervision_const_prepare
*/
class SupervisionFirstMeetingController extends BaseAdminController
{
/**
* @notes 获取工程监理--第一次工地会议列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:12
*/
public function lists()
{
return $this->dataLists(new SupervisionFirstMeetingLists());
}
/**
* @notes 添加工程监理--第一次工地会议
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:12
*/
public function add()
{
$params = (new SupervisionFirstMeetingValidate())->post()->goCheck('add');
$result = SupervisionFirstMeetingLogic::add($params,$this->adminId);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(SupervisionFirstMeetingLogic::getError());
}
/**
* @notes 编辑工程监理--第一次工地会议
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:12
*/
public function edit()
{
$params = (new SupervisionFirstMeetingValidate())->post()->goCheck('edit');
$result = SupervisionFirstMeetingLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(SupervisionFirstMeetingLogic::getError());
}
/**
* @notes 删除工程监理--第一次工地会议
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:12
*/
public function delete()
{
$params = (new SupervisionFirstMeetingValidate())->post()->goCheck('delete');
SupervisionFirstMeetingLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取工程监理--第一次工地会议详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:12
*/
public function detail()
{
$params = (new SupervisionFirstMeetingValidate())->goCheck('detail');
$result = SupervisionFirstMeetingLogic::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_const_prepare;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\supervision_const_prepare\SupervisionRulesLists;
use app\adminapi\logic\supervision_const_prepare\SupervisionRulesLogic;
use app\adminapi\validate\supervision_const_prepare\SupervisionRulesValidate;
/**
* 工程监理--监理细则(文档)控制器
* Class SupervisionRulesController
* @package app\adminapi\controller\supervision_const_prepare
*/
class SupervisionRulesController extends BaseAdminController
{
/**
* @notes 获取工程监理--监理细则(文档)列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function lists()
{
return $this->dataLists(new SupervisionRulesLists());
}
/**
* @notes 添加工程监理--监理细则(文档)
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function add()
{
$params = (new SupervisionRulesValidate())->post()->goCheck('add');
$result = SupervisionRulesLogic::add($params,$this->adminId);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(SupervisionRulesLogic::getError());
}
/**
* @notes 编辑工程监理--监理细则(文档)
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function edit()
{
$params = (new SupervisionRulesValidate())->post()->goCheck('edit');
$result = SupervisionRulesLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(SupervisionRulesLogic::getError());
}
/**
* @notes 删除工程监理--监理细则(文档)
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function delete()
{
$params = (new SupervisionRulesValidate())->post()->goCheck('delete');
SupervisionRulesLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取工程监理--监理细则(文档)详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function detail()
{
$params = (new SupervisionRulesValidate())->goCheck('detail');
$result = SupervisionRulesLogic::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_const_prepare;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\supervision_const_prepare\SupervisionRulesDisclosureLists;
use app\adminapi\logic\supervision_const_prepare\SupervisionRulesDisclosureLogic;
use app\adminapi\validate\supervision_const_prepare\SupervisionRulesDisclosureValidate;
/**
* 工程监理--监理规划/细则交底控制器
* Class SupervisionRulesDisclosureController
* @package app\adminapi\controller\supervision_const_prepare
*/
class SupervisionRulesDisclosureController extends BaseAdminController
{
/**
* @notes 获取工程监理--监理规划/细则交底列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function lists()
{
return $this->dataLists(new SupervisionRulesDisclosureLists());
}
/**
* @notes 添加工程监理--监理规划/细则交底
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function add()
{
$params = (new SupervisionRulesDisclosureValidate())->post()->goCheck('add');
$result = SupervisionRulesDisclosureLogic::add($params,$this->adminId);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(SupervisionRulesDisclosureLogic::getError());
}
/**
* @notes 编辑工程监理--监理规划/细则交底
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function edit()
{
$params = (new SupervisionRulesDisclosureValidate())->post()->goCheck('edit');
$result = SupervisionRulesDisclosureLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(SupervisionRulesDisclosureLogic::getError());
}
/**
* @notes 删除工程监理--监理规划/细则交底
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function delete()
{
$params = (new SupervisionRulesDisclosureValidate())->post()->goCheck('delete');
SupervisionRulesDisclosureLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取工程监理--监理规划/细则交底详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function detail()
{
$params = (new SupervisionRulesDisclosureValidate())->goCheck('detail');
$result = SupervisionRulesDisclosureLogic::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_const_prepare;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\auth\Admin;
use app\common\model\supervision_const_prepare\SupervisionCommencementReport;
use app\common\lists\ListsSearchInterface;
use app\common\model\supervision_project\SupervisionProject;
/**
* 工程监理--开工报告/开工令列表
* Class SupervisionCommencementReportLists
* @package app\adminapi\listssupervision_const_prepare
*/
class SupervisionCommencementReportLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/26 10:17
*/
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/26 10:17
*/
public function lists(): array
{
return SupervisionCommencementReport::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/26 10:17
*/
public function count(): int
{
return SupervisionCommencementReport::where($this->searchWhere)->count();
}
}

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_const_prepare;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\auth\Admin;
use app\common\model\supervision_const_prepare\SupervisionDesignDisclosure;
use app\common\lists\ListsSearchInterface;
use app\common\model\supervision_project\SupervisionProject;
/**
* 设计交底与图纸会审列表
* Class SupervisionDesignDisclosureLists
* @package app\adminapi\listssupervision_const_prepare
*/
class SupervisionDesignDisclosureLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/26 09:36
*/
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/26 09:36
*/
public function lists(): array
{
return SupervisionDesignDisclosure::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/26 09:36
*/
public function count(): int
{
return SupervisionDesignDisclosure::where($this->searchWhere)->count();
}
}

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_const_prepare;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\auth\Admin;
use app\common\model\supervision_const_prepare\SupervisionFirstMeeting;
use app\common\lists\ListsSearchInterface;
use app\common\model\supervision_project\SupervisionProject;
/**
* 工程监理--第一次工地会议列表
* Class SupervisionFirstMeetingLists
* @package app\adminapi\listssupervision_const_prepare
*/
class SupervisionFirstMeetingLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/26 09:12
*/
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/26 09:12
*/
public function lists(): array
{
return SupervisionFirstMeeting::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/26 09:12
*/
public function count(): int
{
return SupervisionFirstMeeting::where($this->searchWhere)->count();
}
}

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_const_prepare;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\auth\Admin;
use app\common\model\supervision_const_prepare\SupervisionRulesDisclosure;
use app\common\lists\ListsSearchInterface;
use app\common\model\supervision_project\SupervisionProject;
/**
* 工程监理--监理规划/细则交底列表
* Class SupervisionRulesDisclosureLists
* @package app\adminapi\listssupervision_const_prepare
*/
class SupervisionRulesDisclosureLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/26 09:49
*/
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/26 09:49
*/
public function lists(): array
{
return SupervisionRulesDisclosure::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/26 09:49
*/
public function count(): int
{
return SupervisionRulesDisclosure::where($this->searchWhere)->count();
}
}

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_const_prepare;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\auth\Admin;
use app\common\model\supervision_const_prepare\SupervisionRules;
use app\common\lists\ListsSearchInterface;
use app\common\model\supervision_project\SupervisionProject;
/**
* 工程监理--监理细则(文档)列表
* Class SupervisionRulesLists
* @package app\adminapi\listssupervision_const_prepare
*/
class SupervisionRulesLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/26 09:49
*/
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/26 09:49
*/
public function lists(): array
{
return SupervisionRules::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/26 09:49
*/
public function count(): int
{
return SupervisionRules::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_const_prepare;
use app\common\model\auth\Admin;
use app\common\model\supervision_const_prepare\SupervisionCommencementReport;
use app\common\logic\BaseLogic;
use app\common\model\supervision_project\SupervisionProject;
use think\facade\Db;
/**
* 工程监理--开工报告/开工令逻辑
* Class SupervisionCommencementReportLogic
* @package app\adminapi\logic\supervision_const_prepare
*/
class SupervisionCommencementReportLogic extends BaseLogic
{
/**
* @notes 添加工程监理--开工报告/开工令
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/26 10:17
*/
public static function add(array $params,$admin_id): bool
{
Db::startTrans();
try {
SupervisionCommencementReport::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/26 10:17
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
SupervisionCommencementReport::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/26 10:17
*/
public static function delete(array $params): bool
{
return SupervisionCommencementReport::destroy($params['id']);
}
/**
* @notes 获取工程监理--开工报告/开工令详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/26 10:17
*/
public static function detail($params): array
{
$data = SupervisionCommencementReport::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_const_prepare;
use app\common\model\auth\Admin;
use app\common\model\supervision_const_prepare\SupervisionDesignDisclosure;
use app\common\logic\BaseLogic;
use app\common\model\supervision_project\SupervisionProject;
use think\facade\Db;
/**
* 设计交底与图纸会审逻辑
* Class SupervisionDesignDisclosureLogic
* @package app\adminapi\logic\supervision_const_prepare
*/
class SupervisionDesignDisclosureLogic extends BaseLogic
{
/**
* @notes 添加设计交底与图纸会审
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/26 09:36
*/
public static function add(array $params,$admin_id): bool
{
Db::startTrans();
try {
SupervisionDesignDisclosure::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/26 09:36
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
SupervisionDesignDisclosure::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/26 09:36
*/
public static function delete(array $params): bool
{
return SupervisionDesignDisclosure::destroy($params['id']);
}
/**
* @notes 获取设计交底与图纸会审详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/26 09:36
*/
public static function detail($params): array
{
$data = SupervisionDesignDisclosure::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_const_prepare;
use app\common\model\auth\Admin;
use app\common\model\supervision_const_prepare\SupervisionFirstMeeting;
use app\common\logic\BaseLogic;
use app\common\model\supervision_project\SupervisionProject;
use think\facade\Db;
/**
* 工程监理--第一次工地会议逻辑
* Class SupervisionFirstMeetingLogic
* @package app\adminapi\logic\supervision_const_prepare
*/
class SupervisionFirstMeetingLogic extends BaseLogic
{
/**
* @notes 添加工程监理--第一次工地会议
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/26 09:12
*/
public static function add(array $params,$admin_id): bool
{
Db::startTrans();
try {
SupervisionFirstMeeting::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/26 09:12
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
SupervisionFirstMeeting::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/26 09:12
*/
public static function delete(array $params): bool
{
return SupervisionFirstMeeting::destroy($params['id']);
}
/**
* @notes 获取工程监理--第一次工地会议详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/26 09:12
*/
public static function detail($params): array
{
$data = SupervisionFirstMeeting::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_const_prepare;
use app\common\model\auth\Admin;
use app\common\model\supervision_const_prepare\SupervisionRulesDisclosure;
use app\common\logic\BaseLogic;
use app\common\model\supervision_project\SupervisionProject;
use think\facade\Db;
/**
* 工程监理--监理规划/细则交底逻辑
* Class SupervisionRulesDisclosureLogic
* @package app\adminapi\logic\supervision_const_prepare
*/
class SupervisionRulesDisclosureLogic extends BaseLogic
{
/**
* @notes 添加工程监理--监理规划/细则交底
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/26 09:49
*/
public static function add(array $params,$admin_id): bool
{
Db::startTrans();
try {
SupervisionRulesDisclosure::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/26 09:49
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
SupervisionRulesDisclosure::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/26 09:49
*/
public static function delete(array $params): bool
{
return SupervisionRulesDisclosure::destroy($params['id']);
}
/**
* @notes 获取工程监理--监理规划/细则交底详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/26 09:49
*/
public static function detail($params): array
{
$data = SupervisionRulesDisclosure::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_const_prepare;
use app\common\model\auth\Admin;
use app\common\model\supervision_const_prepare\SupervisionRules;
use app\common\logic\BaseLogic;
use app\common\model\supervision_project\SupervisionProject;
use think\facade\Db;
/**
* 工程监理--监理细则(文档)逻辑
* Class SupervisionRulesLogic
* @package app\adminapi\logic\supervision_const_prepare
*/
class SupervisionRulesLogic extends BaseLogic
{
/**
* @notes 添加工程监理--监理细则(文档)
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/26 09:49
*/
public static function add(array $params,$admin_id): bool
{
Db::startTrans();
try {
SupervisionRules::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/26 09:49
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
SupervisionRules::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/26 09:49
*/
public static function delete(array $params): bool
{
return SupervisionRules::destroy($params['id']);
}
/**
* @notes 获取工程监理--监理细则(文档)详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/26 09:49
*/
public static function detail($params): array
{
$data = SupervisionRules::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\validate\supervision_const_prepare;
use app\common\model\supervision_const_prepare\SupervisionCommencementReport;
use app\common\model\supervision_project\SupervisionProject;
use app\common\validate\BaseValidate;
/**
* 工程监理--开工报告/开工令验证器
* Class SupervisionCommencementReportValidate
* @package app\adminapi\validate\supervision_const_prepare
*/
class SupervisionCommencementReportValidate 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' => '文档简介',
'create_user' => '操作人',
];
/**
* @notes 添加场景
* @return SupervisionCommencementReportValidate
* @author likeadmin
* @date 2024/02/26 10:17
*/
public function sceneAdd()
{
return $this->remove('id',true);
}
/**
* @notes 编辑场景
* @return SupervisionCommencementReportValidate
* @author likeadmin
* @date 2024/02/26 10:17
*/
public function sceneEdit()
{}
/**
* @notes 删除场景
* @return SupervisionCommencementReportValidate
* @author likeadmin
* @date 2024/02/26 10:17
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupervisionCommencementReportValidate
* @author likeadmin
* @date 2024/02/26 10:17
*/
public function sceneDetail()
{
return $this->only(['id']);
}
public function checkData($value): bool|string
{
$data = SupervisionCommencementReport::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,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\validate\supervision_const_prepare;
use app\common\model\supervision_const_prepare\SupervisionDesignDisclosure;
use app\common\model\supervision_project\SupervisionProject;
use app\common\validate\BaseValidate;
/**
* 设计交底与图纸会审验证器
* Class SupervisionDesignDisclosureValidate
* @package app\adminapi\validate\supervision_const_prepare
*/
class SupervisionDesignDisclosureValidate 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' => '文档简介',
'create_user' => '操作人',
];
/**
* @notes 添加场景
* @return SupervisionDesignDisclosureValidate
* @author likeadmin
* @date 2024/02/26 09:36
*/
public function sceneAdd()
{
return $this->remove('id',true);
}
/**
* @notes 编辑场景
* @return SupervisionDesignDisclosureValidate
* @author likeadmin
* @date 2024/02/26 09:36
*/
public function sceneEdit()
{}
/**
* @notes 删除场景
* @return SupervisionDesignDisclosureValidate
* @author likeadmin
* @date 2024/02/26 09:36
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupervisionDesignDisclosureValidate
* @author likeadmin
* @date 2024/02/26 09:36
*/
public function sceneDetail()
{
return $this->only(['id']);
}
public function checkData($value): bool|string
{
$data = SupervisionDesignDisclosure::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,128 @@
<?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_const_prepare;
use app\common\model\supervision_const_prepare\SupervisionFirstMeeting;
use app\common\model\supervision_project\SupervisionProject;
use app\common\validate\BaseValidate;
/**
* 工程监理--第一次工地会议验证器
* Class SupervisionFirstMeetingValidate
* @package app\adminapi\validate\supervision_const_prepare
*/
class SupervisionFirstMeetingValidate 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' => '文档简介',
'annex' => '附件',
'create_user' => '操作人',
];
/**
* @notes 添加场景
* @return SupervisionFirstMeetingValidate
* @author likeadmin
* @date 2024/02/26 09:12
*/
public function sceneAdd()
{
return $this->remove('id',true);
}
/**
* @notes 编辑场景
* @return SupervisionFirstMeetingValidate
* @author likeadmin
* @date 2024/02/26 09:12
*/
public function sceneEdit()
{}
/**
* @notes 删除场景
* @return SupervisionFirstMeetingValidate
* @author likeadmin
* @date 2024/02/26 09:12
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupervisionFirstMeetingValidate
* @author likeadmin
* @date 2024/02/26 09:12
*/
public function sceneDetail()
{
return $this->only(['id']);
}
public function checkData($value): bool|string
{
$data = SupervisionFirstMeeting::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,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\validate\supervision_const_prepare;
use app\common\model\supervision_const_prepare\SupervisionRulesDisclosure;
use app\common\model\supervision_project\SupervisionProject;
use app\common\validate\BaseValidate;
/**
* 工程监理--监理规划/细则交底验证器
* Class SupervisionRulesDisclosureValidate
* @package app\adminapi\validate\supervision_const_prepare
*/
class SupervisionRulesDisclosureValidate 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' => '文档简介',
'create_user' => '操作人',
];
/**
* @notes 添加场景
* @return SupervisionRulesDisclosureValidate
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function sceneAdd()
{
return $this->remove('id',true);
}
/**
* @notes 编辑场景
* @return SupervisionRulesDisclosureValidate
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function sceneEdit()
{}
/**
* @notes 删除场景
* @return SupervisionRulesDisclosureValidate
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupervisionRulesDisclosureValidate
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function sceneDetail()
{
return $this->only(['id']);
}
public function checkData($value): bool|string
{
$data = SupervisionRulesDisclosure::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,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\validate\supervision_const_prepare;
use app\common\model\supervision_const_prepare\SupervisionRules;
use app\common\model\supervision_project\SupervisionProject;
use app\common\validate\BaseValidate;
/**
* 工程监理--监理细则(文档)验证器
* Class SupervisionRulesValidate
* @package app\adminapi\validate\supervision_const_prepare
*/
class SupervisionRulesValidate 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' => '文档简介',
'create_user' => '操作人',
];
/**
* @notes 添加场景
* @return SupervisionRulesValidate
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function sceneAdd()
{
return $this->remove('id',true);
}
/**
* @notes 编辑场景
* @return SupervisionRulesValidate
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function sceneEdit()
{}
/**
* @notes 删除场景
* @return SupervisionRulesValidate
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupervisionRulesValidate
* @author likeadmin
* @date 2024/02/26 09:49
*/
public function sceneDetail()
{
return $this->only(['id']);
}
public function checkData($value): bool|string
{
$data = SupervisionRules::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,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_const_prepare;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
/**
* 工程监理--开工报告/开工令模型
* Class SupervisionCommencementReport
* @package app\common\model\supervision_const_prepare
*/
class SupervisionCommencementReport extends BaseModel
{
use SoftDelete;
protected $name = 'supervision_commencement_report';
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_const_prepare;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
/**
* 设计交底与图纸会审模型
* Class SupervisionDesignDisclosure
* @package app\common\model\supervision_const_prepare
*/
class SupervisionDesignDisclosure extends BaseModel
{
use SoftDelete;
protected $name = 'supervision_design_disclosure';
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_const_prepare;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
/**
* 工程监理--第一次工地会议模型
* Class SupervisionFirstMeeting
* @package app\common\model\supervision_const_prepare
*/
class SupervisionFirstMeeting extends BaseModel
{
use SoftDelete;
protected $name = 'supervision_first_meeting';
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_const_prepare;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
/**
* 工程监理--监理细则(文档)模型
* Class SupervisionRules
* @package app\common\model\supervision_const_prepare
*/
class SupervisionRules extends BaseModel
{
use SoftDelete;
protected $name = 'supervision_rules';
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_const_prepare;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
/**
* 工程监理--监理规划/细则交底模型
* Class SupervisionRulesDisclosure
* @package app\common\model\supervision_const_prepare
*/
class SupervisionRulesDisclosure extends BaseModel
{
use SoftDelete;
protected $name = 'supervision_rules_disclosure';
protected $deleteTime = 'delete_time';
public function getAnnexAttr($value)
{
return !empty($value) ? json_decode($value,true) : '';
}
}