commit
61a360315c
@ -19,6 +19,7 @@ namespace app\adminapi\controller\cost_project;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\cost_project\CostApprovedProjectLists;
|
||||
use app\adminapi\logic\cost_project\CostApprovedProjectLogic;
|
||||
use app\adminapi\logic\cost_project\CostProjectLogic;
|
||||
use app\adminapi\validate\cost_project\CostApprovedProjectValidate;
|
||||
|
||||
|
||||
@ -104,5 +105,10 @@ class CostApprovedProjectController extends BaseAdminController
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
public function createProject()
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$data = CostApprovedProjectLogic::detail($params);
|
||||
$re = CostProjectLogic::createProject($data);
|
||||
}
|
||||
}
|
@ -104,5 +104,11 @@ class CostProjectController extends BaseAdminController
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
public function datas()
|
||||
{
|
||||
$name = $this->request->param('name', '');
|
||||
$datas = CostProjectLogic::datas($name);
|
||||
return $this->data($datas);
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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_qualification_review;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\supervision_qualification_review\SupervisionConstructionManagementPersonnelLists;
|
||||
use app\adminapi\logic\supervision_qualification_review\SupervisionConstructionManagementPersonnelLogic;
|
||||
use app\adminapi\validate\supervision_qualification_review\SupervisionConstructionManagementPersonnelValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--施工管理人员控制器
|
||||
* Class SupervisionConstructionManagementPersonnelController
|
||||
* @package app\adminapi\controller\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionConstructionManagementPersonnelController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--施工管理人员列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 10:33
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new SupervisionConstructionManagementPersonnelLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--施工管理人员
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 10:33
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new SupervisionConstructionManagementPersonnelValidate())->post()->goCheck('add');
|
||||
$result = SupervisionConstructionManagementPersonnelLogic::add($params,$this->adminId);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionConstructionManagementPersonnelLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑工程监理--施工管理人员
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 10:33
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new SupervisionConstructionManagementPersonnelValidate())->post()->goCheck('edit');
|
||||
$result = SupervisionConstructionManagementPersonnelLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionConstructionManagementPersonnelLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除工程监理--施工管理人员
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 10:33
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new SupervisionConstructionManagementPersonnelValidate())->post()->goCheck('delete');
|
||||
SupervisionConstructionManagementPersonnelLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--施工管理人员详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 10:33
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new SupervisionConstructionManagementPersonnelValidate())->goCheck('detail');
|
||||
$result = SupervisionConstructionManagementPersonnelLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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_qualification_review;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\supervision_qualification_review\SupervisionLargeEquipmentLists;
|
||||
use app\adminapi\logic\supervision_qualification_review\SupervisionLargeEquipmentLogic;
|
||||
use app\adminapi\validate\supervision_qualification_review\SupervisionLargeEquipmentValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--大型设备及仪器具控制器
|
||||
* Class SupervisionLargeEquipmentController
|
||||
* @package app\adminapi\controller\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionLargeEquipmentController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--大型设备及仪器具列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new SupervisionLargeEquipmentLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--大型设备及仪器具
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new SupervisionLargeEquipmentValidate())->post()->goCheck('add');
|
||||
$result = SupervisionLargeEquipmentLogic::add($params,$this->adminId);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionLargeEquipmentLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑工程监理--大型设备及仪器具
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new SupervisionLargeEquipmentValidate())->post()->goCheck('edit');
|
||||
$result = SupervisionLargeEquipmentLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionLargeEquipmentLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除工程监理--大型设备及仪器具
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new SupervisionLargeEquipmentValidate())->post()->goCheck('delete');
|
||||
SupervisionLargeEquipmentLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--大型设备及仪器具详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new SupervisionLargeEquipmentValidate())->goCheck('detail');
|
||||
$result = SupervisionLargeEquipmentLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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_qualification_review;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\supervision_qualification_review\SupervisionParticipatingUnitsQualificationsLists;
|
||||
use app\adminapi\logic\supervision_qualification_review\SupervisionParticipatingUnitsQualificationsLogic;
|
||||
use app\adminapi\validate\supervision_qualification_review\SupervisionParticipatingUnitsQualificationsValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--参建单位资质控制器
|
||||
* Class SupervisionParticipatingUnitsQualificationsController
|
||||
* @package app\adminapi\controller\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionParticipatingUnitsQualificationsController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--参建单位资质列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new SupervisionParticipatingUnitsQualificationsLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--参建单位资质
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new SupervisionParticipatingUnitsQualificationsValidate())->post()->goCheck('add');
|
||||
$result = SupervisionParticipatingUnitsQualificationsLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionParticipatingUnitsQualificationsLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑工程监理--参建单位资质
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new SupervisionParticipatingUnitsQualificationsValidate())->post()->goCheck('edit');
|
||||
$result = SupervisionParticipatingUnitsQualificationsLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionParticipatingUnitsQualificationsLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除工程监理--参建单位资质
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new SupervisionParticipatingUnitsQualificationsValidate())->post()->goCheck('delete');
|
||||
SupervisionParticipatingUnitsQualificationsLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--参建单位资质详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new SupervisionParticipatingUnitsQualificationsValidate())->goCheck('detail');
|
||||
$result = SupervisionParticipatingUnitsQualificationsLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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_qualification_review;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\supervision_qualification_review\SupervisionSafetyManagementPersonnelLists;
|
||||
use app\adminapi\logic\supervision_qualification_review\SupervisionSafetyManagementPersonnelLogic;
|
||||
use app\adminapi\validate\supervision_qualification_review\SupervisionSafetyManagementPersonnelValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--安全管理人员控制器
|
||||
* Class SupervisionSafetyManagementPersonnelController
|
||||
* @package app\adminapi\controller\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionSafetyManagementPersonnelController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--安全管理人员列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new SupervisionSafetyManagementPersonnelLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--安全管理人员
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new SupervisionSafetyManagementPersonnelValidate())->post()->goCheck('add');
|
||||
$result = SupervisionSafetyManagementPersonnelLogic::add($params,$this->adminId);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionSafetyManagementPersonnelLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑工程监理--安全管理人员
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new SupervisionSafetyManagementPersonnelValidate())->post()->goCheck('edit');
|
||||
$result = SupervisionSafetyManagementPersonnelLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionSafetyManagementPersonnelLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除工程监理--安全管理人员
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new SupervisionSafetyManagementPersonnelValidate())->post()->goCheck('delete');
|
||||
SupervisionSafetyManagementPersonnelLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--安全管理人员详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new SupervisionSafetyManagementPersonnelValidate())->goCheck('detail');
|
||||
$result = SupervisionSafetyManagementPersonnelLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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_qualification_review;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\supervision_qualification_review\SupervisionSpecialOperationPersonnelLists;
|
||||
use app\adminapi\logic\supervision_qualification_review\SupervisionSpecialOperationPersonnelLogic;
|
||||
use app\adminapi\validate\supervision_qualification_review\SupervisionSpecialOperationPersonnelValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--特种作业人员资质控制器
|
||||
* Class SupervisionSpecialOperationPersonnelController
|
||||
* @package app\adminapi\controller\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionSpecialOperationPersonnelController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--特种作业人员资质列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:45
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new SupervisionSpecialOperationPersonnelLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--特种作业人员资质
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:45
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new SupervisionSpecialOperationPersonnelValidate())->post()->goCheck('add');
|
||||
$result = SupervisionSpecialOperationPersonnelLogic::add($params,$this->adminId);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionSpecialOperationPersonnelLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑工程监理--特种作业人员资质
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:45
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new SupervisionSpecialOperationPersonnelValidate())->post()->goCheck('edit');
|
||||
$result = SupervisionSpecialOperationPersonnelLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionSpecialOperationPersonnelLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除工程监理--特种作业人员资质
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:45
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new SupervisionSpecialOperationPersonnelValidate())->post()->goCheck('delete');
|
||||
SupervisionSpecialOperationPersonnelLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--特种作业人员资质详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:45
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new SupervisionSpecialOperationPersonnelValidate())->goCheck('detail');
|
||||
$result = SupervisionSpecialOperationPersonnelLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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_work;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\supervision_work\SupervisionCheckItemLists;
|
||||
use app\adminapi\logic\supervision_work\SupervisionCheckItemLogic;
|
||||
use app\adminapi\validate\supervision_work\SupervisionCheckItemValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--新增检查项控制器
|
||||
* Class SupervisionCheckItemController
|
||||
* @package app\adminapi\controller\supervision_work
|
||||
*/
|
||||
class SupervisionCheckItemController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--新增检查项列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new SupervisionCheckItemLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--新增检查项
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new SupervisionCheckItemValidate())->post()->goCheck('add');
|
||||
$result = SupervisionCheckItemLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionCheckItemLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑工程监理--新增检查项
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new SupervisionCheckItemValidate())->post()->goCheck('edit');
|
||||
$result = SupervisionCheckItemLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionCheckItemLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除工程监理--新增检查项
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new SupervisionCheckItemValidate())->post()->goCheck('delete');
|
||||
SupervisionCheckItemLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--新增检查项详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new SupervisionCheckItemValidate())->goCheck('detail');
|
||||
$result = SupervisionCheckItemLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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_work;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\supervision_work\SupervisionCheckItemDetailLists;
|
||||
use app\adminapi\logic\supervision_work\SupervisionCheckItemDetailLogic;
|
||||
use app\adminapi\validate\supervision_work\SupervisionCheckItemDetailValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--新增检查项明细控制器
|
||||
* Class SupervisionCheckItemDetailController
|
||||
* @package app\adminapi\controller\supervision_work
|
||||
*/
|
||||
class SupervisionCheckItemDetailController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--新增检查项明细列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new SupervisionCheckItemDetailLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--新增检查项明细
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new SupervisionCheckItemDetailValidate())->post()->goCheck('add');
|
||||
$result = SupervisionCheckItemDetailLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionCheckItemDetailLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑工程监理--新增检查项明细
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new SupervisionCheckItemDetailValidate())->post()->goCheck('edit');
|
||||
$result = SupervisionCheckItemDetailLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionCheckItemDetailLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除工程监理--新增检查项明细
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new SupervisionCheckItemDetailValidate())->post()->goCheck('delete');
|
||||
SupervisionCheckItemDetailLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--新增检查项明细详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new SupervisionCheckItemDetailValidate())->goCheck('detail');
|
||||
$result = SupervisionCheckItemDetailLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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_work;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\supervision_work\SupervisionInspectionLists;
|
||||
use app\adminapi\logic\supervision_work\SupervisionInspectionLogic;
|
||||
use app\adminapi\validate\supervision_work\SupervisionInspectionValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--巡视登记控制器
|
||||
* Class SupervisionInspectionController
|
||||
* @package app\adminapi\controller\supervision_work
|
||||
*/
|
||||
class SupervisionInspectionController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视登记列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new SupervisionInspectionLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--巡视登记
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new SupervisionInspectionValidate())->post()->goCheck('add');
|
||||
$result = SupervisionInspectionLogic::add($params,$this->adminId);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionInspectionLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑工程监理--巡视登记
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new SupervisionInspectionValidate())->post()->goCheck('edit');
|
||||
$result = SupervisionInspectionLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionInspectionLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除工程监理--巡视登记
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new SupervisionInspectionValidate())->post()->goCheck('delete');
|
||||
SupervisionInspectionLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视登记详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new SupervisionInspectionValidate())->goCheck('detail');
|
||||
$result = SupervisionInspectionLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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_work;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\supervision_work\SupervisionInspectionProblemLists;
|
||||
use app\adminapi\logic\supervision_work\SupervisionInspectionProblemLogic;
|
||||
use app\adminapi\validate\supervision_work\SupervisionInspectionProblemValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--巡视问题控制器
|
||||
* Class SupervisionInspectionProblemController
|
||||
* @package app\adminapi\controller\supervision_work
|
||||
*/
|
||||
class SupervisionInspectionProblemController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视问题列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new SupervisionInspectionProblemLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--巡视问题
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new SupervisionInspectionProblemValidate())->post()->goCheck('add');
|
||||
$result = SupervisionInspectionProblemLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionInspectionProblemLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑工程监理--巡视问题
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new SupervisionInspectionProblemValidate())->post()->goCheck('edit');
|
||||
$result = SupervisionInspectionProblemLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionInspectionProblemLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除工程监理--巡视问题
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new SupervisionInspectionProblemValidate())->post()->goCheck('delete');
|
||||
SupervisionInspectionProblemLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视问题详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new SupervisionInspectionProblemValidate())->goCheck('detail');
|
||||
$result = SupervisionInspectionProblemLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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_work;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\supervision_work\SupervisionInspectionResultLists;
|
||||
use app\adminapi\logic\supervision_work\SupervisionInspectionResultLogic;
|
||||
use app\adminapi\validate\supervision_work\SupervisionInspectionResultValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--巡视结果控制器
|
||||
* Class SupervisionInspectionResultController
|
||||
* @package app\adminapi\controller\supervision_work
|
||||
*/
|
||||
class SupervisionInspectionResultController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视结果列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/27 09:23
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new SupervisionInspectionResultLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--巡视结果
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/27 09:23
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new SupervisionInspectionResultValidate())->post()->goCheck('add');
|
||||
$result = SupervisionInspectionResultLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionInspectionResultLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑工程监理--巡视结果
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/27 09:23
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new SupervisionInspectionResultValidate())->post()->goCheck('edit');
|
||||
$result = SupervisionInspectionResultLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(SupervisionInspectionResultLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除工程监理--巡视结果
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/27 09:23
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new SupervisionInspectionResultValidate())->post()->goCheck('delete');
|
||||
SupervisionInspectionResultLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视结果详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/02/27 09:23
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new SupervisionInspectionResultValidate())->goCheck('detail');
|
||||
$result = SupervisionInspectionResultLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -55,7 +55,6 @@ class TaskDetailLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
public function lists(): array
|
||||
{
|
||||
return TaskDetail::where($this->searchWhere)
|
||||
->field(['id', 'task_allocation_dataid', 'task_name', 'task_name_id', 'process', 'task_type_id', 'professional_type', 'engineer', 'engineer_id', 'level', 'first_reviewer', 'first_reviewer_id', 'secondary_reviewer', 'secondary_reviewer_id', 'third_level_reviewer', 'third_level_reviewer_id', 'bid_winning_amount', 'cost', 'approved_amount', 'construction_unit', 'construction_unit_id', 'contact', 'contact_phone', 'days', 'start_date', 'end_date', 'remark'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
|
@ -38,8 +38,8 @@ class CostProjectLists extends BaseAdminDataLists implements ListsSearchInterfac
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['types', 'industry'],
|
||||
'%like%' => ['project_num', 'project_name'],
|
||||
'=' => ['cost_project_id'],
|
||||
'%like%' => ['superior_sort', 'name'],
|
||||
];
|
||||
}
|
||||
|
||||
@ -58,6 +58,7 @@ class CostProjectLists extends BaseAdminDataLists implements ListsSearchInterfac
|
||||
return CostProject::where($this->searchWhere)
|
||||
->field(['id', 'project_num', 'project_name', 'contract_id', 'types', 'industry', 'province', 'city', 'address', 'starting', 'endtime', 'jhgq', 'depar', 'principal', 'person', 'invest', 'budget', 'cost', 'approval', 'aunit', 'Acontact', 'acontactnum', 'date', 'generalize', 'note', 'remark', 'annex'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->with(['contract'])
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
|
@ -1,77 +1,77 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\project_process_management;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\project_process_management\ProjectChangeVisaContent;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* ProjectChangeVisaContent列表
|
||||
* Class ProjectChangeVisaContentLists
|
||||
* @package app\adminapi\listsproject_process_management
|
||||
*/
|
||||
class ProjectChangeVisaContentLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 10:27
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_change_visa_dataid', 'directory', 'unit_name', 'time', 'major', 'category', 'review_content', 'review_comments', 'reviewer', 'reviewer_id', 'declared_value', 'calculated_value', 'remark'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 10:27
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ProjectChangeVisaContent::where($this->searchWhere)
|
||||
->field(['id', 'project_change_visa_dataid', 'directory', 'unit_name', 'time', 'major', 'category', 'review_content', 'review_comments', 'reviewer', 'reviewer_id', 'declared_value', 'calculated_value', 'remark'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 10:27
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ProjectChangeVisaContent::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
<?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\project_process_management;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\project_process_management\ProjectChangeVisaContent;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* ProjectChangeVisaContent列表
|
||||
* Class ProjectChangeVisaContentLists
|
||||
* @package app\adminapi\listsproject_process_management
|
||||
*/
|
||||
class ProjectChangeVisaContentLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 10:27
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_change_visa_dataid', 'directory', 'unit_name', 'time', 'major', 'category', 'review_content', 'review_comments', 'reviewer', 'reviewer_id', 'declared_value', 'calculated_value', 'remark'],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 10:27
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ProjectChangeVisaContent::where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 10:27
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ProjectChangeVisaContent::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -1,77 +1,77 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\project_process_management;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\project_process_management\ProjectChangeVisa;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* ProjectChangeVisa列表
|
||||
* Class ProjectChangeVisaLists
|
||||
* @package app\adminapi\listsproject_process_management
|
||||
*/
|
||||
class ProjectChangeVisaLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 09:58
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['num', 'project', 'project_num'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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:58
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ProjectChangeVisa::where($this->searchWhere)
|
||||
->field(['id', 'dataid', 'num', 'project', 'project_num', 'djr', 'djrq'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 09:58
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ProjectChangeVisa::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
<?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\project_process_management;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\project_process_management\ProjectChangeVisa;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* ProjectChangeVisa列表
|
||||
* Class ProjectChangeVisaLists
|
||||
* @package app\adminapi\listsproject_process_management
|
||||
*/
|
||||
class ProjectChangeVisaLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 09:58
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['num', 'project', 'project_num'],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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:58
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ProjectChangeVisa::where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 09:58
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ProjectChangeVisa::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -1,77 +1,77 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\project_process_management;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\project_process_management\ProjectSurveySignature;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* ProjectSurveySignature列表
|
||||
* Class ProjectSurveySignatureLists
|
||||
* @package app\adminapi\listsproject_process_management
|
||||
*/
|
||||
class ProjectSurveySignatureLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 11:06
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['num', 'project', 'project_num'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 11:06
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ProjectSurveySignature::where($this->searchWhere)
|
||||
->field(['id', 'dataid', 'num', 'project', 'project_num', 'wt_unit', 'jsdw', 'bmfz', 'xmfz', 'riqi', 'people', 'djr', 'apptime', 'content', 'result', 'remark'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 11:06
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ProjectSurveySignature::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
<?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\project_process_management;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\project_process_management\ProjectSurveySignature;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* ProjectSurveySignature列表
|
||||
* Class ProjectSurveySignatureLists
|
||||
* @package app\adminapi\listsproject_process_management
|
||||
*/
|
||||
class ProjectSurveySignatureLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 11:06
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['num', 'project', 'project_num'],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 11:06
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ProjectSurveySignature::where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/23 11:06
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ProjectSurveySignature::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
<?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_qualification_review;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||
use app\common\model\supervision_qualification_review\SupervisionConstructionManagementPersonnel;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\supervision_qualification_review\SupervisionParticipatingUnitsQualifications;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--施工管理人员列表
|
||||
* Class SupervisionConstructionManagementPersonnelLists
|
||||
* @package app\adminapi\listssupervision_qualification_review
|
||||
*/
|
||||
class SupervisionConstructionManagementPersonnelLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 10:33
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['unit_qualification_id'],
|
||||
'%like%' => ['name', 'qualification_name_one', 'qualification_name_two'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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:33
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return SupervisionConstructionManagementPersonnel::withoutField('update_time,delete_time')->where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$unit_qualification = SupervisionParticipatingUnitsQualifications::field('company_id')->where('id',$data['unit_qualification_id'])->findOrEmpty();
|
||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id',$unit_qualification['company_id'])->findOrEmpty();
|
||||
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
|
||||
$data['company_name'] = $company['unit_name'];
|
||||
$data['create_user_name'] = $admin['name'];
|
||||
$data['qualification_one_status_text'] = $data->qualification_one_status_text;
|
||||
$data['qualification_two_status_text'] = $data->qualification_two_status_text;
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--施工管理人员数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 10:33
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return SupervisionConstructionManagementPersonnel::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
<?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_qualification_review;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||
use app\common\model\supervision_qualification_review\SupervisionLargeEquipment;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\supervision_qualification_review\SupervisionParticipatingUnitsQualifications;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--大型设备及仪器具列表
|
||||
* Class SupervisionLargeEquipmentLists
|
||||
* @package app\adminapi\listssupervision_qualification_review
|
||||
*/
|
||||
class SupervisionLargeEquipmentLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['unit_qualification_id'],
|
||||
'%like%' => ['name', 'qualification_name_one', 'qualification_name_two'],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--大型设备及仪器具列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return SupervisionLargeEquipment::withoutField('update_time,delete_time')->where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$unit_qualification = SupervisionParticipatingUnitsQualifications::field('company_id')->where('id',$data['unit_qualification_id'])->findOrEmpty();
|
||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id',$unit_qualification['company_id'])->findOrEmpty();
|
||||
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
|
||||
$data['company_name'] = $company['unit_name'];
|
||||
$data['create_user_name'] = $admin['name'];
|
||||
$data['qualification_one_status_text'] = $data->qualification_one_status_text;
|
||||
$data['qualification_two_status_text'] = $data->qualification_two_status_text;
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--大型设备及仪器具数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return SupervisionLargeEquipment::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -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_qualification_review;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||
use app\common\model\supervision_project\SupervisionProject;
|
||||
use app\common\model\supervision_qualification_review\SupervisionParticipatingUnitsQualifications;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--参建单位资质列表
|
||||
* Class SupervisionParticipatingUnitsQualificationsLists
|
||||
* @package app\adminapi\listssupervision_qualification_review
|
||||
*/
|
||||
class SupervisionParticipatingUnitsQualificationsLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'company_id'],
|
||||
'%like%' => ['qualification_name', 'qualification_number'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--参建单位资质列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return SupervisionParticipatingUnitsQualifications::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();
|
||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id',$data['company_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['company_name'] = $company['unit_name'];
|
||||
$data['qualification_status_text'] = $data->qualification_one_status_text;
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--参建单位资质数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return SupervisionParticipatingUnitsQualifications::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
<?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_qualification_review;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||
use app\common\model\supervision_qualification_review\SupervisionParticipatingUnitsQualifications;
|
||||
use app\common\model\supervision_qualification_review\SupervisionSafetyManagementPersonnel;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--安全管理人员列表
|
||||
* Class SupervisionSafetyManagementPersonnelLists
|
||||
* @package app\adminapi\listssupervision_qualification_review
|
||||
*/
|
||||
class SupervisionSafetyManagementPersonnelLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['unit_qualification_id'],
|
||||
'%like%' => ['name', 'qualification_name_one', 'qualification_name_two'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--安全管理人员列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return SupervisionSafetyManagementPersonnel::withoutField('update_time,delete_time')->where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$unit_qualification = SupervisionParticipatingUnitsQualifications::field('company_id')->where('id',$data['unit_qualification_id'])->findOrEmpty();
|
||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id',$unit_qualification['company_id'])->findOrEmpty();
|
||||
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
|
||||
$data['company_name'] = $company['unit_name'];
|
||||
$data['create_user_name'] = $admin['name'];
|
||||
$data['qualification_one_status_text'] = $data->qualification_one_status_text;
|
||||
$data['qualification_two_status_text'] = $data->qualification_two_status_text;
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--安全管理人员数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return SupervisionSafetyManagementPersonnel::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
<?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_qualification_review;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||
use app\common\model\supervision_qualification_review\SupervisionParticipatingUnitsQualifications;
|
||||
use app\common\model\supervision_qualification_review\SupervisionSpecialOperationPersonnel;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--特种作业人员资质列表
|
||||
* Class SupervisionSpecialOperationPersonnelLists
|
||||
* @package app\adminapi\listssupervision_qualification_review
|
||||
*/
|
||||
class SupervisionSpecialOperationPersonnelLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:45
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['unit_qualification_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/26 11:45
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return SupervisionSpecialOperationPersonnel::withoutField('update_time,delete_time')->where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$unit_qualification = SupervisionParticipatingUnitsQualifications::field('company_id')->where('id',$data['unit_qualification_id'])->findOrEmpty();
|
||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id',$unit_qualification['company_id'])->findOrEmpty();
|
||||
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
|
||||
$data['company_name'] = $company['unit_name'];
|
||||
$data['create_user_name'] = $admin['name'];
|
||||
$data['status_text'] = $data->status_text;
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--特种作业人员资质数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:45
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return SupervisionSpecialOperationPersonnel::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
<?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_work;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\supervision_work\SupervisionCheckItemDetail;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--新增检查项明细列表
|
||||
* Class SupervisionCheckItemDetailLists
|
||||
* @package app\adminapi\listssupervision_work
|
||||
*/
|
||||
class SupervisionCheckItemDetailLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['node_id'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--新增检查项明细列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$where = [];
|
||||
if(isset($params['node_ids']) && $params['node_ids'] != ''){
|
||||
$where[] = ['node_id','in',$params['node_ids']];
|
||||
}
|
||||
return SupervisionCheckItemDetail::withoutField('create_time,update_time,delete_time')->where($this->searchWhere)->where($where)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$data['must_check_text'] = $data->must_check_text;
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--新增检查项明细数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$where = [];
|
||||
if(isset($params['node_ids']) && $params['node_ids'] != ''){
|
||||
$where[] = ['node_id','in',$params['node_ids']];
|
||||
}
|
||||
return SupervisionCheckItemDetail::where($this->searchWhere)->where($where)->count();
|
||||
}
|
||||
|
||||
}
|
@ -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_work;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\supervision_project\SupervisionProject;
|
||||
use app\common\model\supervision_work\SupervisionCheckItem;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--新增检查项列表
|
||||
* Class SupervisionCheckItemLists
|
||||
* @package app\adminapi\listssupervision_work
|
||||
*/
|
||||
class SupervisionCheckItemLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'node_type'],
|
||||
'%like%' => ['node_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 15:34
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
$lists = SupervisionCheckItem::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();
|
||||
$pid = SupervisionCheckItem::field('node_name')->where('id',$data['pid'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['p_node_name'] = $pid['node_name'];
|
||||
$data['node_type_text'] = $data->node_type_text;
|
||||
})
|
||||
->toArray();
|
||||
return buildTree($lists,'pid');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--新增检查项数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return SupervisionCheckItem::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\supervision_work;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||
use app\common\model\supervision_project\SupervisionProject;
|
||||
use app\common\model\supervision_work\SupervisionCheckItem;
|
||||
use app\common\model\supervision_work\SupervisionInspection;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--巡视登记列表
|
||||
* Class SupervisionInspectionLists
|
||||
* @package app\adminapi\listssupervision_work
|
||||
*/
|
||||
class SupervisionInspectionLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'inspection_type'],
|
||||
'%like%' => ['inspection_code'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视登记列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return SupervisionInspection::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();
|
||||
$check_item = SupervisionCheckItem::field('node_name')->where('id',$data['check_item_id'])->findOrEmpty();
|
||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id',$data['company_id'])->findOrEmpty();
|
||||
$check_item_detail = SupervisionCheckItem::where('id','in',$data['check_item_detail_ids'])->column('node_name');
|
||||
$create_user = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['check_item_name'] = $check_item['node_name'];
|
||||
$data['company_name'] = $company['unit_name'];
|
||||
$data['check_item_detail_name'] = implode(',',$check_item_detail);
|
||||
$data['create_user_name'] = $create_user['name'];
|
||||
$data['inspection_type_text'] = $data->inspection_type_text;
|
||||
$data['is_important_text'] = $data->is_important_text;
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视登记数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return SupervisionInspection::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
<?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_work;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\supervision_work\SupervisionInspectionProblem;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--巡视问题列表
|
||||
* Class SupervisionInspectionProblemLists
|
||||
* @package app\adminapi\listssupervision_work
|
||||
*/
|
||||
class SupervisionInspectionProblemLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['inspection_id'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视问题列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return SupervisionInspectionProblem::withoutField('create_time,update_time,delete_time')->where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视问题数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return SupervisionInspectionProblem::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
<?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_work;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\supervision_work\SupervisionInspectionResult;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--巡视结果列表
|
||||
* Class SupervisionInspectionResultLists
|
||||
* @package app\adminapi\listssupervision_work
|
||||
*/
|
||||
class SupervisionInspectionResultLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/27 09:23
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['inspection_id', 'must_check', 'check_result'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视结果列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/27 09:23
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return SupervisionInspectionResult::withoutField('create_time,update_time,delete_time')->where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$data['must_check_text'] = $data->must_check_text;
|
||||
$data['check_result_text'] = $data->check_result_text;
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视结果数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/27 09:23
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return SupervisionInspectionResult::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -1,77 +1,77 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\task;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\task\TaskAllocation;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* TaskAllocation列表
|
||||
* Class TaskAllocationLists
|
||||
* @package app\adminapi\liststask
|
||||
*/
|
||||
class TaskAllocationLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/22 10:47
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/22 10:47
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return TaskAllocation::where($this->searchWhere)
|
||||
->field(['id', 'dataid', 'num', 'project', 'project_num', 'head', 'apptime', 'annex'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/22 10:47
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return TaskAllocation::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
<?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\task;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\task\TaskAllocation;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* TaskAllocation列表
|
||||
* Class TaskAllocationLists
|
||||
* @package app\adminapi\liststask
|
||||
*/
|
||||
class TaskAllocationLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/02/22 10:47
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project'],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/02/22 10:47
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return TaskAllocation::where($this->searchWhere)->with(['taskTypeInfo', 'projectInfo'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/02/22 10:47
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return TaskAllocation::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -38,7 +38,8 @@ class TaskTypeLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
|
||||
'=' => ['cost_project_id'],
|
||||
'%like%' => ['superior_sort', 'name'],
|
||||
];
|
||||
}
|
||||
|
||||
@ -54,8 +55,14 @@ class TaskTypeLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
$startTime = $this->request->param('start_time', '');
|
||||
$endTime = $this->request->param('end_time', '');
|
||||
return TaskType::where($this->searchWhere)
|
||||
->field(['id', 'dataid', 'cost_project_id', 'num', 'name', 'superior_sort', 'level', 'remarks'])
|
||||
->where(function ($query) use($startTime, $endTime) {
|
||||
if ($startTime && $endTime) {
|
||||
$query->whereBetweenTime('create_time', $startTime.' 00:00:00', $endTime.' 23:59:59');
|
||||
}})
|
||||
->field(['id', 'dataid', 'cost_project_id', 'num', 'name', 'superior_sort', 'level', 'remarks','create_time'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
|
@ -41,11 +41,9 @@ class TaskDetailLogic extends BaseLogic
|
||||
Db::startTrans();
|
||||
try {
|
||||
TaskDetail::create([
|
||||
'task_allocation_dataid' => $params['task_allocation_dataid'],
|
||||
'task_name' => $params['task_name'],
|
||||
'task_name_id' => $params['task_name_id'],
|
||||
'process' => $params['process'],
|
||||
'task_allocation_id' => $params['task_allocation_dataid'],
|
||||
'task_type_id' => $params['task_type_id'],
|
||||
'process' => $params['process'],
|
||||
'professional_type' => $params['professional_type'],
|
||||
'engineer' => $params['engineer'],
|
||||
'engineer_id' => $params['engineer_id'],
|
||||
@ -91,11 +89,9 @@ class TaskDetailLogic extends BaseLogic
|
||||
Db::startTrans();
|
||||
try {
|
||||
TaskDetail::where('id', $params['id'])->update([
|
||||
'task_allocation_dataid' => $params['task_allocation_dataid'],
|
||||
'task_name' => $params['task_name'],
|
||||
'task_name_id' => $params['task_name_id'],
|
||||
'process' => $params['process'],
|
||||
'task_allocation_id' => $params['task_allocation_dataid'],
|
||||
'task_type_id' => $params['task_type_id'],
|
||||
'process' => $params['process'],
|
||||
'professional_type' => $params['professional_type'],
|
||||
'engineer' => $params['engineer'],
|
||||
'engineer_id' => $params['engineer_id'],
|
||||
|
@ -41,7 +41,7 @@ class CostProjectLogic extends BaseLogic
|
||||
Db::startTrans();
|
||||
try {
|
||||
CostProject::create([
|
||||
'project_num' => $params['project_num'],
|
||||
'project_num' => generate_sn(CostProject::class, 'project_num'),
|
||||
'project_name' => $params['project_name'],
|
||||
'contract_id' => $params['contract_id'],
|
||||
'types' => $params['types'],
|
||||
@ -52,6 +52,7 @@ class CostProjectLogic extends BaseLogic
|
||||
'starting' => $params['starting'],
|
||||
'endtime' => $params['endtime'],
|
||||
'jhgq' => $params['jhgq'],
|
||||
'org_id' => $params['org_id'],
|
||||
'depar' => $params['depar'],
|
||||
'principal' => $params['principal'],
|
||||
'person' => $params['person'],
|
||||
@ -102,6 +103,7 @@ class CostProjectLogic extends BaseLogic
|
||||
'starting' => $params['starting'],
|
||||
'endtime' => $params['endtime'],
|
||||
'jhgq' => $params['jhgq'],
|
||||
'org_id' => $params['org_id'],
|
||||
'depar' => $params['depar'],
|
||||
'principal' => $params['principal'],
|
||||
'person' => $params['person'],
|
||||
@ -151,6 +153,55 @@ class CostProjectLogic extends BaseLogic
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
return CostProject::findOrEmpty($params['id'])->toArray();
|
||||
return CostProject::with(['contract'])->findOrEmpty($params['id'])->toArray();
|
||||
}
|
||||
|
||||
public static function datas($name)
|
||||
{
|
||||
$datas = CostProject::where(function ($query) use ($name) {
|
||||
if ($name) {
|
||||
$query->where('project_name', 'like', '%' . $name . '%');
|
||||
}
|
||||
})
|
||||
->field(['id', 'project_num', 'project_name'])
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
foreach ($datas as &$item) {
|
||||
$item['projectinfo'] = 'ID:' . $item['id'] . ' / 名称:' . $item['project_name'];
|
||||
}
|
||||
return $datas;
|
||||
}
|
||||
|
||||
public static function createProject($data)
|
||||
{
|
||||
return CostProject::create([
|
||||
'project_num' => generate_sn(CostProject::class, 'project_num'),
|
||||
'project_name' => $data['project_name'],
|
||||
'contract_id' => $data['contract_id'],
|
||||
'types' => $data['types'],
|
||||
'industry' => $data['industry'],
|
||||
'province' => $data['province'],
|
||||
'city' => $data['city'],
|
||||
'address' => $data['address'],
|
||||
'starting' => $data['starting'],
|
||||
'endtime' => $data['endtime'],
|
||||
'jhgq' => $data['jhgq'],
|
||||
'depar' => $data['depar'],
|
||||
'principal' => $data['principal'],
|
||||
'person' => $data['person'],
|
||||
'invest' => $data['invest'],
|
||||
'budget' => $data['budget'],
|
||||
'cost' => $data['cost'],
|
||||
'approval' => $data['approval'],
|
||||
'aunit' => $data['aunit'],
|
||||
'Acontact' => $data['Acontact'],
|
||||
'acontactnum' => $data['acontactnum'],
|
||||
'date' => $data['date'],
|
||||
'generalize' => $data['generalize'],
|
||||
'note' => $data['note'],
|
||||
'remark' => $data['remark'],
|
||||
'annex' => $data['annex']
|
||||
]);
|
||||
}
|
||||
}
|
@ -41,7 +41,7 @@ class DeptLogic extends BaseLogic
|
||||
Dept::create([
|
||||
'org_id' => $params['org_id'],
|
||||
'name' => $params['name'],
|
||||
'leader' => $params['leader'],
|
||||
'leader' => $params['leader'] ?? 0,
|
||||
'mobile' => $params['mobile'],
|
||||
'status' => $params['status'],
|
||||
'sort' => $params['sort'] ?? 0
|
||||
@ -63,7 +63,7 @@ class DeptLogic extends BaseLogic
|
||||
'id' => $params['id'],
|
||||
'org_id' => $params['org_id'],
|
||||
'name' => $params['name'],
|
||||
'leader' => $params['leader'],
|
||||
'leader' => $params['leader'] ?? 0,
|
||||
'mobile' => $params['mobile'],
|
||||
'status' => $params['status'],
|
||||
'sort' => $params['sort'] ?? 0
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
<?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_qualification_review;
|
||||
|
||||
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||
use app\common\model\supervision_qualification_review\SupervisionConstructionManagementPersonnel;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\supervision_qualification_review\SupervisionParticipatingUnitsQualifications;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--施工管理人员逻辑
|
||||
* Class SupervisionConstructionManagementPersonnelLogic
|
||||
* @package app\adminapi\logic\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionConstructionManagementPersonnelLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--施工管理人员
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 10:33
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionConstructionManagementPersonnel::create([
|
||||
'unit_qualification_id' => $params['unit_qualification_id'],
|
||||
'name' => $params['name'],
|
||||
'id_card' => $params['id_card'],
|
||||
'technical_title' => $params['technical_title'],
|
||||
'job' => $params['job'],
|
||||
'qualification_name_one' => $params['qualification_name_one'],
|
||||
'certification_body_one' => $params['certification_body_one'],
|
||||
'qualification_number_one' => $params['qualification_number_one'],
|
||||
'get_date_one' => !empty($params['get_date_one']) ? strtotime($params['get_date_one']) : 0,
|
||||
'effective_date_one' => !empty($params['effective_date_one']) ? strtotime($params['effective_date_one']) : 0,
|
||||
'qualification_one_status' => $params['qualification_one_status'],
|
||||
'qualification_name_two' => $params['qualification_name_two'],
|
||||
'certification_body_two' => $params['certification_body_two'],
|
||||
'qualification_number_two' => $params['qualification_number_two'],
|
||||
'get_date_two' => !empty($params['get_date_two']) ? strtotime($params['get_date_two']) : 0,
|
||||
'effective_date_two' => !empty($params['effective_date_two']) ? strtotime($params['effective_date_two']) : 0,
|
||||
'qualification_two_status' => $params['qualification_two_status'],
|
||||
'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/26 10:33
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionConstructionManagementPersonnel::where('id', $params['id'])->update([
|
||||
'unit_qualification_id' => $params['unit_qualification_id'],
|
||||
'name' => $params['name'],
|
||||
'id_card' => $params['id_card'],
|
||||
'technical_title' => $params['technical_title'],
|
||||
'job' => $params['job'],
|
||||
'qualification_name_one' => $params['qualification_name_one'],
|
||||
'certification_body_one' => $params['certification_body_one'],
|
||||
'qualification_number_one' => $params['qualification_number_one'],
|
||||
'get_date_one' => !empty($params['get_date_one']) ? strtotime($params['get_date_one']) : 0,
|
||||
'effective_date_one' => !empty($params['effective_date_one']) ? strtotime($params['effective_date_one']) : 0,
|
||||
'qualification_one_status' => $params['qualification_one_status'],
|
||||
'qualification_name_two' => $params['qualification_name_two'],
|
||||
'certification_body_two' => $params['certification_body_two'],
|
||||
'qualification_number_two' => $params['qualification_number_two'],
|
||||
'get_date_two' => !empty($params['get_date_two']) ? strtotime($params['get_date_two']) : 0,
|
||||
'effective_date_two' => !empty($params['effective_date_two']) ? strtotime($params['effective_date_two']) : 0,
|
||||
'qualification_two_status' => $params['qualification_two_status'],
|
||||
'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/26 10:33
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return SupervisionConstructionManagementPersonnel::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--施工管理人员详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 10:33
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = SupervisionConstructionManagementPersonnel::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$unit_qualification = SupervisionParticipatingUnitsQualifications::field('company_id')->where('id',$data['unit_qualification_id'])->findOrEmpty();
|
||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id',$unit_qualification['company_id'])->findOrEmpty();
|
||||
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
|
||||
$data['company_name'] = $company['unit_name'];
|
||||
$data['create_user_name'] = $admin['name'];
|
||||
$data['qualification_one_status_text'] = $data->qualification_one_status_text;
|
||||
$data['qualification_two_status_text'] = $data->qualification_two_status_text;
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
<?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_qualification_review;
|
||||
|
||||
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||
use app\common\model\supervision_qualification_review\SupervisionLargeEquipment;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\supervision_qualification_review\SupervisionParticipatingUnitsQualifications;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--大型设备及仪器具逻辑
|
||||
* Class SupervisionLargeEquipmentLogic
|
||||
* @package app\adminapi\logic\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionLargeEquipmentLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--大型设备及仪器具
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionLargeEquipment::create([
|
||||
'unit_qualification_id' => $params['unit_qualification_id'],
|
||||
'name' => $params['name'],
|
||||
'qualification_name_one' => $params['qualification_name_one'],
|
||||
'certification_body_one' => $params['certification_body_one'],
|
||||
'qualification_number_one' => $params['qualification_number_one'],
|
||||
'get_date_one' => !empty($params['get_date_one']) ? strtotime($params['get_date_one']) : 0,
|
||||
'effective_date_one' => !empty($params['effective_date_one']) ? strtotime($params['effective_date_one']) : 0,
|
||||
'qualification_one_status' => $params['qualification_one_status'],
|
||||
'qualification_name_two' => $params['qualification_name_two'],
|
||||
'certification_body_two' => $params['certification_body_two'],
|
||||
'qualification_number_two' => $params['qualification_number_two'],
|
||||
'get_date_two' => !empty($params['get_date_two']) ? strtotime($params['get_date_two']) : 0,
|
||||
'effective_date_two' => !empty($params['effective_date_two']) ? strtotime($params['effective_date_two']) : 0,
|
||||
'qualification_two_status' => $params['qualification_two_status'],
|
||||
'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/26 13:51
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionLargeEquipment::where('id', $params['id'])->update([
|
||||
'unit_qualification_id' => $params['unit_qualification_id'],
|
||||
'name' => $params['name'],
|
||||
'qualification_name_one' => $params['qualification_name_one'],
|
||||
'certification_body_one' => $params['certification_body_one'],
|
||||
'qualification_number_one' => $params['qualification_number_one'],
|
||||
'get_date_one' => !empty($params['get_date_one']) ? strtotime($params['get_date_one']) : 0,
|
||||
'effective_date_one' => !empty($params['effective_date_one']) ? strtotime($params['effective_date_one']) : 0,
|
||||
'qualification_one_status' => $params['qualification_one_status'],
|
||||
'qualification_name_two' => $params['qualification_name_two'],
|
||||
'certification_body_two' => $params['certification_body_two'],
|
||||
'qualification_number_two' => $params['qualification_number_two'],
|
||||
'get_date_two' => !empty($params['get_date_two']) ? strtotime($params['get_date_two']) : 0,
|
||||
'effective_date_two' => !empty($params['effective_date_two']) ? strtotime($params['effective_date_two']) : 0,
|
||||
'qualification_two_status' => $params['qualification_two_status'],
|
||||
'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/26 13:51
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return SupervisionLargeEquipment::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--大型设备及仪器具详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = SupervisionLargeEquipment::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$unit_qualification = SupervisionParticipatingUnitsQualifications::field('company_id')->where('id',$data['unit_qualification_id'])->findOrEmpty();
|
||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id',$unit_qualification['company_id'])->findOrEmpty();
|
||||
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
|
||||
$data['company_name'] = $company['unit_name'];
|
||||
$data['create_user_name'] = $admin['name'];
|
||||
$data['qualification_one_status_text'] = $data->qualification_one_status_text;
|
||||
$data['qualification_two_status_text'] = $data->qualification_two_status_text;
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -0,0 +1,129 @@
|
||||
<?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_qualification_review;
|
||||
|
||||
|
||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||
use app\common\model\supervision_project\SupervisionProject;
|
||||
use app\common\model\supervision_qualification_review\SupervisionParticipatingUnitsQualifications;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--参建单位资质逻辑
|
||||
* Class SupervisionParticipatingUnitsQualificationsLogic
|
||||
* @package app\adminapi\logic\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionParticipatingUnitsQualificationsLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--参建单位资质
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionParticipatingUnitsQualifications::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'company_id' => $params['company_id'],
|
||||
'qualification_name' => $params['qualification_name'],
|
||||
'qualification_number' => $params['qualification_number'],
|
||||
'get_date' => !empty($params['get_date']) ? strtotime($params['get_date']) : 0,
|
||||
'effective_date' => !empty($params['effective_date']) ? strtotime($params['effective_date']) : 0,
|
||||
'qualification_status' => $params['qualification_status'],
|
||||
'remark' => $params['remark'],
|
||||
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
|
||||
]);
|
||||
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 14:03
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionParticipatingUnitsQualifications::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'company_id' => $params['company_id'],
|
||||
'qualification_name' => $params['qualification_name'],
|
||||
'qualification_number' => $params['qualification_number'],
|
||||
'get_date' => !empty($params['get_date']) ? strtotime($params['get_date']) : 0,
|
||||
'effective_date' => !empty($params['effective_date']) ? strtotime($params['effective_date']) : 0,
|
||||
'qualification_status' => $params['qualification_status'],
|
||||
'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/26 14:03
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return SupervisionParticipatingUnitsQualifications::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--参建单位资质详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = SupervisionParticipatingUnitsQualifications::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = SupervisionProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id',$data['company_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['company_name'] = $company['unit_name'];
|
||||
$data['qualification_status_text'] = $data->qualification_one_status_text;
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
<?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_qualification_review;
|
||||
|
||||
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||
use app\common\model\supervision_qualification_review\SupervisionParticipatingUnitsQualifications;
|
||||
use app\common\model\supervision_qualification_review\SupervisionSafetyManagementPersonnel;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--安全管理人员逻辑
|
||||
* Class SupervisionSafetyManagementPersonnelLogic
|
||||
* @package app\adminapi\logic\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionSafetyManagementPersonnelLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--安全管理人员
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionSafetyManagementPersonnel::create([
|
||||
'unit_qualification_id' => $params['unit_qualification_id'],
|
||||
'name' => $params['name'],
|
||||
'id_card' => $params['id_card'],
|
||||
'technical_title' => $params['technical_title'],
|
||||
'job' => $params['job'],
|
||||
'qualification_name_one' => $params['qualification_name_one'],
|
||||
'certification_body_one' => $params['certification_body_one'],
|
||||
'qualification_number_one' => $params['qualification_number_one'],
|
||||
'get_date_one' => !empty($params['get_date_one']) ? strtotime($params['get_date_one']) : 0,
|
||||
'effective_date_one' => !empty($params['effective_date_one']) ? strtotime($params['effective_date_one']) : 0,
|
||||
'qualification_one_status' => $params['qualification_one_status'],
|
||||
'qualification_name_two' => $params['qualification_name_two'],
|
||||
'certification_body_two' => $params['certification_body_two'],
|
||||
'qualification_number_two' => $params['qualification_number_two'],
|
||||
'get_date_two' => !empty($params['get_date_two']) ? strtotime($params['get_date_two']) : 0,
|
||||
'effective_date_two' => !empty($params['effective_date_two']) ? strtotime($params['effective_date_two']) : 0,
|
||||
'qualification_two_status' => $params['qualification_two_status'],
|
||||
'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/26 11:30
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionSafetyManagementPersonnel::where('id', $params['id'])->update([
|
||||
'unit_qualification_id' => $params['unit_qualification_id'],
|
||||
'name' => $params['name'],
|
||||
'id_card' => $params['id_card'],
|
||||
'technical_title' => $params['technical_title'],
|
||||
'job' => $params['job'],
|
||||
'qualification_name_one' => $params['qualification_name_one'],
|
||||
'certification_body_one' => $params['certification_body_one'],
|
||||
'qualification_number_one' => $params['qualification_number_one'],
|
||||
'get_date_one' => !empty($params['get_date_one']) ? strtotime($params['get_date_one']) : 0,
|
||||
'effective_date_one' => !empty($params['effective_date_one']) ? strtotime($params['effective_date_one']) : 0,
|
||||
'qualification_one_status' => $params['qualification_one_status'],
|
||||
'qualification_name_two' => $params['qualification_name_two'],
|
||||
'certification_body_two' => $params['certification_body_two'],
|
||||
'qualification_number_two' => $params['qualification_number_two'],
|
||||
'get_date_two' => !empty($params['get_date_two']) ? strtotime($params['get_date_two']) : 0,
|
||||
'effective_date_two' => !empty($params['effective_date_two']) ? strtotime($params['effective_date_two']) : 0,
|
||||
'qualification_two_status' => $params['qualification_two_status'],
|
||||
'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/26 11:30
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return SupervisionSafetyManagementPersonnel::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--安全管理人员详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = SupervisionSafetyManagementPersonnel::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$unit_qualification = SupervisionParticipatingUnitsQualifications::field('company_id')->where('id',$data['unit_qualification_id'])->findOrEmpty();
|
||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id',$unit_qualification['company_id'])->findOrEmpty();
|
||||
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
|
||||
$data['company_name'] = $company['unit_name'];
|
||||
$data['create_user_name'] = $admin['name'];
|
||||
$data['qualification_one_status_text'] = $data->qualification_one_status_text;
|
||||
$data['qualification_two_status_text'] = $data->qualification_two_status_text;
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
<?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_qualification_review;
|
||||
|
||||
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||
use app\common\model\supervision_qualification_review\SupervisionParticipatingUnitsQualifications;
|
||||
use app\common\model\supervision_qualification_review\SupervisionSpecialOperationPersonnel;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--特种作业人员资质逻辑
|
||||
* Class SupervisionSpecialOperationPersonnelLogic
|
||||
* @package app\adminapi\logic\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionSpecialOperationPersonnelLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--特种作业人员资质
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:45
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionSpecialOperationPersonnel::create([
|
||||
'unit_qualification_id' => $params['unit_qualification_id'],
|
||||
'name' => $params['name'],
|
||||
'work_type' => $params['work_type'],
|
||||
'id_card' => $params['id_card'],
|
||||
'validity_period' => !empty($params['validity_period']) ? strtotime($params['validity_period']) : 0,
|
||||
'enter_time' => !empty($params['enter_time']) ? strtotime($params['enter_time']) : 0,
|
||||
'leave_time' => !empty($params['leave_time']) ? strtotime($params['leave_time']) : 0,
|
||||
'status' => $params['status'],
|
||||
'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/26 11:45
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionSpecialOperationPersonnel::where('id', $params['id'])->update([
|
||||
'unit_qualification_id' => $params['unit_qualification_id'],
|
||||
'name' => $params['name'],
|
||||
'work_type' => $params['work_type'],
|
||||
'id_card' => $params['id_card'],
|
||||
'validity_period' => !empty($params['validity_period']) ? strtotime($params['validity_period']) : 0,
|
||||
'enter_time' => !empty($params['enter_time']) ? strtotime($params['enter_time']) : 0,
|
||||
'leave_time' => !empty($params['leave_time']) ? strtotime($params['leave_time']) : 0,
|
||||
'status' => $params['status'],
|
||||
'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/26 11:45
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return SupervisionSpecialOperationPersonnel::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--特种作业人员资质详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:45
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = SupervisionSpecialOperationPersonnel::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$unit_qualification = SupervisionParticipatingUnitsQualifications::field('company_id')->where('id',$data['unit_qualification_id'])->findOrEmpty();
|
||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id',$unit_qualification['company_id'])->findOrEmpty();
|
||||
$admin = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
|
||||
$data['company_name'] = $company['unit_name'];
|
||||
$data['create_user_name'] = $admin['name'];
|
||||
$data['status_text'] = $data->status_text;
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
<?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_work;
|
||||
|
||||
|
||||
use app\common\model\supervision_work\SupervisionCheckItemDetail;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--新增检查项明细逻辑
|
||||
* Class SupervisionCheckItemDetailLogic
|
||||
* @package app\adminapi\logic\supervision_work
|
||||
*/
|
||||
class SupervisionCheckItemDetailLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--新增检查项明细
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionCheckItemDetail::create([
|
||||
'node_id' => $params['node_id'],
|
||||
'check_type' => $params['check_type'],
|
||||
'check_content' => $params['check_content'],
|
||||
'must_check' => $params['must_check'],
|
||||
]);
|
||||
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 15:34
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionCheckItemDetail::where('id', $params['id'])->update([
|
||||
'node_id' => $params['node_id'],
|
||||
'check_type' => $params['check_type'],
|
||||
'check_content' => $params['check_content'],
|
||||
'must_check' => $params['must_check'],
|
||||
'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 15:34
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return SupervisionCheckItemDetail::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--新增检查项明细详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = SupervisionCheckItemDetail::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$data['must_check_text'] = $data->must_check_text;
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -0,0 +1,160 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\supervision_work;
|
||||
|
||||
|
||||
use app\common\model\supervision_project\SupervisionProject;
|
||||
use app\common\model\supervision_work\SupervisionCheckItem;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\supervision_work\SupervisionCheckItemDetail;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--新增检查项逻辑
|
||||
* Class SupervisionCheckItemLogic
|
||||
* @package app\adminapi\logic\supervision_work
|
||||
*/
|
||||
class SupervisionCheckItemLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--新增检查项
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
$res = SupervisionCheckItem::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'node_name' => $params['node_name'],
|
||||
'node_type' => $params['node_type'],
|
||||
'node_code' => $params['node_code'],
|
||||
'pid' => $params['pid'],
|
||||
'inspection_basis' => $params['inspection_basis'],
|
||||
'reference_law' => $params['reference_law'],
|
||||
]);
|
||||
if(!empty($params['check_item_detail'])){
|
||||
foreach($params['check_item_detail'] as $v){
|
||||
SupervisionCheckItemDetail::create([
|
||||
'node_id' => $res->id,
|
||||
'check_type' => $v['check_type'],
|
||||
'check_content' => $v['check_content'],
|
||||
'must_check' => $v['must_check'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
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 15:34
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionCheckItem::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'node_name' => $params['node_name'],
|
||||
'node_type' => $params['node_type'],
|
||||
'node_code' => $params['node_code'],
|
||||
'pid' => $params['pid'],
|
||||
'inspection_basis' => $params['inspection_basis'],
|
||||
'reference_law' => $params['reference_law'],
|
||||
'update_time' => time(),
|
||||
]);
|
||||
if(!empty($params['check_item_detail'])){
|
||||
foreach($params['check_item_detail'] as $v){
|
||||
if(!empty($v['id'])){
|
||||
SupervisionCheckItemDetail::where('id',$v['id'])->update([
|
||||
'node_id' => $params['id'],
|
||||
'check_type' => $v['check_type'],
|
||||
'check_content' => $v['check_content'],
|
||||
'must_check' => $v['must_check'],
|
||||
'update_time' => time(),
|
||||
]);
|
||||
}else{
|
||||
SupervisionCheckItemDetail::create([
|
||||
'node_id' => $params['id'],
|
||||
'check_type' => $v['check_type'],
|
||||
'check_content' => $v['check_content'],
|
||||
'must_check' => $v['must_check'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
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 15:34
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
$data = SupervisionCheckItem::where('pid',$params['id'])->findOrEmpty();
|
||||
if(!$data->isEmpty()){
|
||||
self::setError('当前节点下存在子节点,请先删除子节点');
|
||||
return false;
|
||||
}
|
||||
return SupervisionCheckItem::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--新增检查项详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 15:34
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = SupervisionCheckItem::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = SupervisionProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$pid = SupervisionCheckItem::field('node_name')->where('id',$data['pid'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['p_node_name'] = $pid['node_name'];
|
||||
$data['node_type_text'] = $data->node_type_text;
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -0,0 +1,226 @@
|
||||
<?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_work;
|
||||
|
||||
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||
use app\common\model\supervision_project\SupervisionProject;
|
||||
use app\common\model\supervision_work\SupervisionCheckItem;
|
||||
use app\common\model\supervision_work\SupervisionInspection;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\supervision_work\SupervisionInspectionProblem;
|
||||
use app\common\model\supervision_work\SupervisionInspectionResult;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--巡视登记逻辑
|
||||
* Class SupervisionInspectionLogic
|
||||
* @package app\adminapi\logic\supervision_work
|
||||
*/
|
||||
class SupervisionInspectionLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--巡视登记
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
$res = SupervisionInspection::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'inspection_code' => data_unique_code('XS'),
|
||||
'inspection_type' => $params['inspection_type'],
|
||||
'check_item_id' => $params['check_item_id'],
|
||||
'inspection_position' => $params['inspection_position'],
|
||||
'workers' => $params['workers'],
|
||||
'managers' => $params['managers'],
|
||||
'start_time' => !empty($params['start_time']) ? strtotime($params['start_time']) : 0,
|
||||
'end_time' => !empty($params['end_time']) ? strtotime($params['end_time']) : 0,
|
||||
'inspection_user' => $params['inspection_user'],
|
||||
'company_id' => $params['company_id'],
|
||||
'inspection_content' => $params['inspection_content'],
|
||||
'is_important' => $params['is_important'],
|
||||
'follow_user' => $params['follow_user'],
|
||||
'check_item_detail_ids' => $params['check_item_detail_ids'] ? json_encode($params['check_item_detail_ids']) : null,
|
||||
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
|
||||
'create_user' => $admin_id,
|
||||
]);
|
||||
if(!empty($params['inspection_result'])){
|
||||
foreach($params['inspection_result'] as $v){
|
||||
SupervisionInspectionResult::create([
|
||||
'inspection_id' => $res->id,
|
||||
'check_type' => $v['check_type'],
|
||||
'check_content' => $v['check_content'],
|
||||
'must_check' => $v['must_check'],
|
||||
'check_result' => $v['check_result']
|
||||
]);
|
||||
}
|
||||
}
|
||||
if(!empty($params['inspection_problem'])){
|
||||
foreach($params['inspection_problem'] as $v){
|
||||
SupervisionInspectionProblem::create([
|
||||
'inspection_id' => $res->id,
|
||||
'problem_cate' => $v['problem_cate'],
|
||||
'problem_description' => $v['problem_description'],
|
||||
'problem_name' => $v['problem_name'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
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 17:18
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionInspection::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'inspection_type' => $params['inspection_type'],
|
||||
'check_item_id' => $params['check_item_id'],
|
||||
'inspection_position' => $params['inspection_position'],
|
||||
'workers' => $params['workers'],
|
||||
'managers' => $params['managers'],
|
||||
'start_time' => !empty($params['start_time']) ? strtotime($params['start_time']) : 0,
|
||||
'end_time' => !empty($params['end_time']) ? strtotime($params['end_time']) : 0,
|
||||
'inspection_user' => $params['inspection_user'],
|
||||
'company_id' => $params['company_id'],
|
||||
'inspection_content' => $params['inspection_content'],
|
||||
'is_important' => $params['is_important'],
|
||||
'follow_user' => $params['follow_user'],
|
||||
'check_item_detail_ids' => $params['check_item_detail_ids'] ? json_encode($params['check_item_detail_ids']) : null,
|
||||
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
|
||||
'update_time' => time(),
|
||||
]);
|
||||
if(!empty($params['inspection_result'])){
|
||||
foreach($params['inspection_result'] as $v){
|
||||
if(!empty($v['id'])){
|
||||
SupervisionInspectionResult::where('id',$v['id'])->update([
|
||||
'inspection_id' => $params['id'],
|
||||
'check_type' => $v['check_type'],
|
||||
'check_content' => $v['check_content'],
|
||||
'must_check' => $v['must_check'],
|
||||
'check_result' => $v['check_result'],
|
||||
'update_time' => time(),
|
||||
]);
|
||||
}else{
|
||||
SupervisionInspectionResult::create([
|
||||
'inspection_id' => $params['id'],
|
||||
'check_type' => $v['check_type'],
|
||||
'check_content' => $v['check_content'],
|
||||
'must_check' => $v['must_check'],
|
||||
'check_result' => $v['check_result']
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($params['inspection_problem'])){
|
||||
foreach($params['inspection_problem'] as $v){
|
||||
if(!empty($v['id'])){
|
||||
SupervisionInspectionProblem::where('id',$v['id'])->update([
|
||||
'inspection_id' => $params['id'],
|
||||
'problem_cate' => $v['problem_cate'],
|
||||
'problem_description' => $v['problem_description'],
|
||||
'problem_name' => $v['problem_name'],
|
||||
]);
|
||||
}else{
|
||||
SupervisionInspectionProblem::create([
|
||||
'inspection_id' => $params['id'],
|
||||
'problem_cate' => $v['problem_cate'],
|
||||
'problem_description' => $v['problem_description'],
|
||||
'problem_name' => $v['problem_name'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
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 17:18
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
$inspection_result = SupervisionInspectionResult::where('inspection_id',$params['id'])->findOrEmpty();
|
||||
if(!$inspection_result->isEmpty()){
|
||||
self::setError('该巡视内容下存在巡视结果数据,请先删除巡视结果数据');
|
||||
return false;
|
||||
}
|
||||
$inspection_problem = SupervisionInspectionProblem::where('inspection_id',$params['id'])->findOrEmpty();
|
||||
if(!$inspection_problem->isEmpty()){
|
||||
self::setError('该巡视内容下存在巡视问题数据,请先删除巡视问题数据');
|
||||
return false;
|
||||
}
|
||||
return SupervisionInspection::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视登记详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = SupervisionInspection::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = SupervisionProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$check_item = SupervisionCheckItem::field('node_name')->where('id',$data['check_item_id'])->findOrEmpty();
|
||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id',$data['company_id'])->findOrEmpty();
|
||||
$check_item_detail = SupervisionCheckItem::where('id','in',$data['check_item_detail_ids'])->column('node_name');
|
||||
$create_user = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['check_item_name'] = $check_item['node_name'];
|
||||
$data['company_name'] = $company['unit_name'];
|
||||
$data['check_item_detail_name'] = implode(',',$check_item_detail);
|
||||
$data['create_user_name'] = $create_user['name'];
|
||||
$data['inspection_type_text'] = $data->inspection_type_text;
|
||||
$data['is_important_text'] = $data->is_important_text;
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
<?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_work;
|
||||
|
||||
|
||||
use app\common\model\supervision_work\SupervisionInspectionProblem;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--巡视问题逻辑
|
||||
* Class SupervisionInspectionProblemLogic
|
||||
* @package app\adminapi\logic\supervision_work
|
||||
*/
|
||||
class SupervisionInspectionProblemLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--巡视问题
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionInspectionProblem::create([
|
||||
'inspection_id' => $params['inspection_id'],
|
||||
'problem_cate' => $params['problem_cate'],
|
||||
'problem_description' => $params['problem_description'],
|
||||
'problem_name' => $params['problem_name'],
|
||||
]);
|
||||
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 17:18
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionInspectionProblem::where('id', $params['id'])->update([
|
||||
'inspection_id' => $params['inspection_id'],
|
||||
'problem_cate' => $params['problem_cate'],
|
||||
'problem_description' => $params['problem_description'],
|
||||
'problem_name' => $params['problem_name'],
|
||||
'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 17:18
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return SupervisionInspectionProblem::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视问题详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 17:18
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = SupervisionInspectionProblem::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
<?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_work;
|
||||
|
||||
|
||||
use app\common\model\supervision_work\SupervisionInspectionResult;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--巡视结果逻辑
|
||||
* Class SupervisionInspectionResultLogic
|
||||
* @package app\adminapi\logic\supervision_work
|
||||
*/
|
||||
class SupervisionInspectionResultLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加工程监理--巡视结果
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/02/27 09:23
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionInspectionResult::create([
|
||||
'inspection_id' => $params['inspection_id'],
|
||||
'check_type' => $params['check_type'],
|
||||
'check_content' => $params['check_content'],
|
||||
'must_check' => $params['must_check'],
|
||||
'check_result' => $params['check_result']
|
||||
]);
|
||||
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/27 09:23
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SupervisionInspectionResult::where('id', $params['id'])->update([
|
||||
'inspection_id' => $params['inspection_id'],
|
||||
'check_type' => $params['check_type'],
|
||||
'check_content' => $params['check_content'],
|
||||
'must_check' => $params['must_check'],
|
||||
'check_result' => $params['check_result'],
|
||||
'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/27 09:23
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return SupervisionInspectionResult::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工程监理--巡视结果详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/02/27 09:23
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = SupervisionInspectionResult::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$data['must_check_text'] = $data->must_check_text;
|
||||
$data['check_result_text'] = $data->check_result_text;
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -15,8 +15,10 @@
|
||||
namespace app\adminapi\logic\task;
|
||||
|
||||
|
||||
use app\adminapi\logic\TaskDetailLogic;
|
||||
use app\common\model\task\TaskAllocation;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\task\TaskType;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
@ -38,18 +40,31 @@ class TaskAllocationLogic extends BaseLogic
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
// 项目id关联任务类别
|
||||
$projectId = $params['project_id'];
|
||||
// 任务
|
||||
$taskType = TaskType::where('cost_project_id', $projectId)->findOrEmpty();
|
||||
if ($taskType->isEmpty()) {
|
||||
self::setError('项目未配置任务类别');
|
||||
}
|
||||
Db::startTrans();
|
||||
try {
|
||||
TaskAllocation::create([
|
||||
'dataid' => $params['dataid'],
|
||||
'num' => $params['num'],
|
||||
'project' => $params['project'],
|
||||
'project_num' => $params['project_num'],
|
||||
'head' => $params['head'],
|
||||
// 任务分配
|
||||
$taskAllocation = TaskAllocation::create([
|
||||
'dataid' => generate_sn(TaskAllocation::class, 'dataid'),
|
||||
'num' => generate_sn(TaskAllocation::class, 'num'),
|
||||
'task_type_id' => $taskType['id'], // 任务类别id
|
||||
'cost_project_id' => $taskType['cost_project_id'], // 项目id
|
||||
'apptime' => $params['apptime'],
|
||||
'annex' => $params['annex'],
|
||||
]);
|
||||
|
||||
// 任务明细
|
||||
$taskDetail = $params['task_detail'];
|
||||
foreach ($taskDetail as $item) {
|
||||
$item['task_allocation_id'] = $taskAllocation->id;
|
||||
$item['task_type_id'] = $taskType['id'];
|
||||
TaskDetailLogic::add($item);
|
||||
}
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
@ -69,18 +84,21 @@ class TaskAllocationLogic extends BaseLogic
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
// 项目id关联任务类别
|
||||
$projectId = $params['project_id'];
|
||||
// 任务
|
||||
$taskType = TaskType::where('cost_project_id', $projectId)->findOrEmpty();
|
||||
if ($taskType->isEmpty()) {
|
||||
self::setError('项目未配置任务类别');
|
||||
}
|
||||
Db::startTrans();
|
||||
try {
|
||||
TaskAllocation::where('id', $params['id'])->update([
|
||||
'dataid' => $params['dataid'],
|
||||
'num' => $params['num'],
|
||||
'project' => $params['project'],
|
||||
'project_num' => $params['project_num'],
|
||||
'head' => $params['head'],
|
||||
'apptime' => $params['apptime'],
|
||||
'annex' => $params['annex'],
|
||||
'task_type_id' => $taskType['id'], // 任务类别id
|
||||
'cost_project_id' => $taskType['cost_project_id'], // 项目id
|
||||
'apptime' => $params['apptime'],
|
||||
'annex' => $params['annex'],
|
||||
]);
|
||||
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
@ -113,6 +131,6 @@ class TaskAllocationLogic extends BaseLogic
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
return TaskAllocation::findOrEmpty($params['id'])->toArray();
|
||||
return TaskAllocation::findOrEmpty($params['id'])->with(['taskTypeInfo', 'projectInfo'])->toArray();
|
||||
}
|
||||
}
|
@ -33,11 +33,11 @@ class CostProjectValidate extends BaseValidate
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
'project_name' => 'require',
|
||||
'contract_id' => 'require|checkContract',
|
||||
'contract_id' => 'require',
|
||||
'types' => 'checkTypes',
|
||||
'industry' => 'checkIndustry',
|
||||
'starting' => 'require|dateFormat:Y-m-d',
|
||||
'endtime' => 'require|dateFormat:Y-m-d',
|
||||
'starting' => 'require',
|
||||
'endtime' => 'require',
|
||||
'jhgq' => 'require',
|
||||
'principal' => 'require',
|
||||
'invest' => 'require',
|
||||
|
@ -33,7 +33,7 @@ class DeptValidate extends BaseValidate
|
||||
'id' => 'require|checkDept',
|
||||
'org_id' => 'require|checkOrg',
|
||||
'name' => 'require|length:1,30',
|
||||
'leader' => 'require|checkLeader',
|
||||
'leader' => 'checkLeader',
|
||||
'mobile' => 'require|mobile',
|
||||
'status' => 'require|in:0,1',
|
||||
'sort' => 'egt:0',
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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\validate\supervision_qualification_review;
|
||||
|
||||
use app\common\model\supervision_qualification_review\SupervisionConstructionManagementPersonnel;
|
||||
use app\common\model\supervision_qualification_review\SupervisionParticipatingUnitsQualifications;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--施工管理人员验证器
|
||||
* Class SupervisionConstructionManagementPersonnelValidate
|
||||
* @package app\adminapi\validate\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionConstructionManagementPersonnelValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'unit_qualification_id' => 'require|checkUnitQualification',
|
||||
'name' => 'require',
|
||||
'id_card' => 'idCard',
|
||||
'get_date_one' => 'dateFormat:Y-m-d',
|
||||
'effective_date_one' => 'dateFormat:Y-m-d',
|
||||
'qualification_one_status' => 'in:0,1',
|
||||
'get_date_two' => 'dateFormat:Y-m-d',
|
||||
'effective_date_two' => 'dateFormat:Y-m-d',
|
||||
'qualification_two_status' => 'in:0,1',
|
||||
'annex' => 'checkAnnex',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'unit_qualification_id' => '参建单位资质id',
|
||||
'name' => '姓名',
|
||||
'id_card' => '身份证',
|
||||
'technical_title' => '技术职称',
|
||||
'job' => '岗位',
|
||||
'qualification_name_one' => '资质名称1',
|
||||
'certification_body_one' => '认证机构1',
|
||||
'qualification_number_one' => '资质编号1',
|
||||
'get_date_one' => '发证日期1',
|
||||
'effective_date_one' => '有效日期1',
|
||||
'qualification_one_status' => '资质1状态',
|
||||
'qualification_name_two' => '资质名称2',
|
||||
'certification_body_two' => '认证机构2',
|
||||
'qualification_number_two' => '资质编号2',
|
||||
'get_date_two' => '发证日期2',
|
||||
'effective_date_two' => '有效日期2',
|
||||
'qualification_two_status' => '资质2状态',
|
||||
'remark' => '备注',
|
||||
'create_user' => '创建人',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return SupervisionConstructionManagementPersonnelValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 10:33
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->remove('id',true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return SupervisionConstructionManagementPersonnelValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 10:33
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return SupervisionConstructionManagementPersonnelValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 10:33
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return SupervisionConstructionManagementPersonnelValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 10:33
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = SupervisionConstructionManagementPersonnel::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkUnitQualification($value): bool|string
|
||||
{
|
||||
$data = SupervisionParticipatingUnitsQualifications::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;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
<?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_qualification_review;
|
||||
|
||||
use app\common\model\supervision_qualification_review\SupervisionLargeEquipment;
|
||||
use app\common\model\supervision_qualification_review\SupervisionParticipatingUnitsQualifications;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--大型设备及仪器具验证器
|
||||
* Class SupervisionLargeEquipmentValidate
|
||||
* @package app\adminapi\validate\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionLargeEquipmentValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'unit_qualification_id' => 'require|checkUnitQualification',
|
||||
'name' => 'require',
|
||||
'get_date_one' => 'dateFormat:Y-m-d',
|
||||
'effective_date_one' => 'dateFormat:Y-m-d',
|
||||
'qualification_one_status' => 'in:0,1',
|
||||
'get_date_two' => 'dateFormat:Y-m-d',
|
||||
'effective_date_two' => 'dateFormat:Y-m-d',
|
||||
'qualification_two_status' => 'in:0,1',
|
||||
'annex' => 'checkAnnex',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'unit_qualification_id' => '参建单位资质id',
|
||||
'name' => '设备名称',
|
||||
'qualification_name_one' => '资质名称1',
|
||||
'certification_body_one' => '认证机构1',
|
||||
'qualification_number_one' => '资质编号1',
|
||||
'get_date_one' => '发证日期1',
|
||||
'effective_date_one' => '有效日期1',
|
||||
'qualification_one_status' => '资质1状态',
|
||||
'qualification_name_two' => '资质名称2',
|
||||
'certification_body_two' => '认证机构2',
|
||||
'qualification_number_two' => '资质编号2',
|
||||
'get_date_two' => '发证日期2',
|
||||
'effective_date_two' => '有效日期2',
|
||||
'qualification_two_status' => '资质2状态',
|
||||
'remark' => '备注',
|
||||
'create_user' => '创建人',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return SupervisionLargeEquipmentValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->remove('id',true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return SupervisionLargeEquipmentValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return SupervisionLargeEquipmentValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return SupervisionLargeEquipmentValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 13:51
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = SupervisionLargeEquipment::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkUnitQualification($value): bool|string
|
||||
{
|
||||
$data = SupervisionParticipatingUnitsQualifications::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;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
<?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_qualification_review;
|
||||
|
||||
|
||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||
use app\common\model\supervision_project\SupervisionProject;
|
||||
use app\common\model\supervision_qualification_review\SupervisionParticipatingUnitsQualifications;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--参建单位资质验证器
|
||||
* Class SupervisionParticipatingUnitsQualificationsValidate
|
||||
* @package app\adminapi\validate\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionParticipatingUnitsQualificationsValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'company_id' => 'require|checkCompany',
|
||||
'qualification_name' => 'require',
|
||||
'get_date' => 'dateFormat:Y-m-d',
|
||||
'effective_date' => 'dateFormat:Y-m-d',
|
||||
'qualification_status' => 'in:0,1',
|
||||
'annex' => 'checkAnnex',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'company_id' => '所属单位',
|
||||
'qualification_name' => '资质名称',
|
||||
'qualification_number' => '资质编号',
|
||||
'get_date' => '发证日期',
|
||||
'effective_date' => '有效日期',
|
||||
'qualification_status' => '资质状态',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return SupervisionParticipatingUnitsQualificationsValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->remove('id',true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return SupervisionParticipatingUnitsQualificationsValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return SupervisionParticipatingUnitsQualificationsValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return SupervisionParticipatingUnitsQualificationsValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 14:03
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = SupervisionParticipatingUnitsQualifications::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 checkCompany($value,$rule,$data){
|
||||
$companyData = SupervisionParticipatingUnits::where('id',$value)->where('project_id',$data['project_id'])->findOrEmpty();
|
||||
if($companyData->isEmpty()){
|
||||
return '所属单位信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user