新增资质审查模块内容
This commit is contained in:
parent
61934129ad
commit
b1cba49907
@ -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,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,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' => $params['validity_period'],
|
||||
'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,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;
|
||||
}
|
||||
|
||||
}
|
@ -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\SupervisionParticipatingUnitsQualifications;
|
||||
use app\common\model\supervision_qualification_review\SupervisionSafetyManagementPersonnel;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--安全管理人员验证器
|
||||
* Class SupervisionSafetyManagementPersonnelValidate
|
||||
* @package app\adminapi\validate\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionSafetyManagementPersonnelValidate 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 SupervisionSafetyManagementPersonnelValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->remove('id',true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return SupervisionSafetyManagementPersonnelValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return SupervisionSafetyManagementPersonnelValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return SupervisionSafetyManagementPersonnelValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:30
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = SupervisionSafetyManagementPersonnel::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,137 @@
|
||||
<?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\SupervisionParticipatingUnitsQualifications;
|
||||
use app\common\model\supervision_qualification_review\SupervisionSpecialOperationPersonnel;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--特种作业人员资质验证器
|
||||
* Class SupervisionSpecialOperationPersonnelValidate
|
||||
* @package app\adminapi\validate\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionSpecialOperationPersonnelValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'unit_qualification_id' => 'require|checkUnitQualification',
|
||||
'name' => 'require',
|
||||
'id_card' => 'idCard',
|
||||
'validity_period' => 'dateFormat:Y-m-d',
|
||||
'enter_time' => 'dateFormat:Y-m-d H:i:s',
|
||||
'leave_time' => 'dateFormat:Y-m-d H:i:s',
|
||||
'status' => 'in:0,1',
|
||||
'annex' => 'checkAnnex',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'unit_qualification_id' => '参建单位资质id',
|
||||
'name' => '姓名',
|
||||
'work_type' => '工种',
|
||||
'id_card' => '身份证',
|
||||
'validity_period' => '资格有效期',
|
||||
'enter_time' => '进场时间',
|
||||
'leave_time' => '离场时间',
|
||||
'status' => '状态',
|
||||
'remark' => '备注',
|
||||
'create_user' => '创建人',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return SupervisionSpecialOperationPersonnelValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:45
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->remove('id',true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return SupervisionSpecialOperationPersonnelValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:45
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return SupervisionSpecialOperationPersonnelValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:45
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return SupervisionSpecialOperationPersonnelValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/02/26 11:45
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = SupervisionSpecialOperationPersonnel::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,67 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\supervision_qualification_review;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--施工管理人员模型
|
||||
* Class SupervisionConstructionManagementPersonnel
|
||||
* @package app\common\model\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionConstructionManagementPersonnel extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'supervision_construction_management_personnel';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getGetDateOneAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getEffectiveDateOneAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getGetDateTwoAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getEffectiveDateTwoAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getQualificationOneStatusTextAttr($value,$data){
|
||||
$arr = [0=>'有效', 1=>'无效'];
|
||||
return $arr[$data['qualification_one_status']];
|
||||
}
|
||||
|
||||
public function getQualificationTwoStatusTextAttr($value,$data){
|
||||
$arr = [0=>'有效', 1=>'无效'];
|
||||
return $arr[$data['qualification_two_status']];
|
||||
}
|
||||
|
||||
public function getAnnexAttr($value)
|
||||
{
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\supervision_qualification_review;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--大型设备及仪器具模型
|
||||
* Class SupervisionLargeEquipment
|
||||
* @package app\common\model\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionLargeEquipment extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'supervision_large_equipment';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getGetDateOneAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getEffectiveDateOneAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getGetDateTwoAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getEffectiveDateTwoAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getQualificationOneStatusTextAttr($value,$data){
|
||||
$arr = [0=>'有效', 1=>'无效'];
|
||||
return $arr[$data['qualification_one_status']];
|
||||
}
|
||||
|
||||
public function getQualificationTwoStatusTextAttr($value,$data){
|
||||
$arr = [0=>'有效', 1=>'无效'];
|
||||
return $arr[$data['qualification_two_status']];
|
||||
}
|
||||
|
||||
public function getAnnexAttr($value)
|
||||
{
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\supervision_qualification_review;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--参建单位资质模型
|
||||
* Class SupervisionParticipatingUnitsQualifications
|
||||
* @package app\common\model\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionParticipatingUnitsQualifications extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'supervision_participating_units_qualifications';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getGetDateAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getEffectiveDateAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getQualificationStatusTextAttr($value,$data){
|
||||
$arr = [0=>'有效', 1=>'无效'];
|
||||
return $arr[$data['qualification_status']];
|
||||
}
|
||||
|
||||
public function getAnnexAttr($value)
|
||||
{
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\supervision_qualification_review;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--安全管理人员模型
|
||||
* Class SupervisionSafetyManagementPersonnel
|
||||
* @package app\common\model\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionSafetyManagementPersonnel extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'supervision_safety_management_personnel';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getGetDateOneAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getEffectiveDateOneAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getGetDateTwoAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getEffectiveDateTwoAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getQualificationOneStatusTextAttr($value,$data){
|
||||
$arr = [0=>'有效', 1=>'无效'];
|
||||
return $arr[$data['qualification_one_status']];
|
||||
}
|
||||
|
||||
public function getQualificationTwoStatusTextAttr($value,$data){
|
||||
$arr = [0=>'有效', 1=>'无效'];
|
||||
return $arr[$data['qualification_two_status']];
|
||||
}
|
||||
|
||||
public function getAnnexAttr($value)
|
||||
{
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\supervision_qualification_review;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 工程监理--特种作业人员资质模型
|
||||
* Class SupervisionSpecialOperationPersonnel
|
||||
* @package app\common\model\supervision_qualification_review
|
||||
*/
|
||||
class SupervisionSpecialOperationPersonnel extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'supervision_special_operation_personnel';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getEnterTimeAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d H:i:s', $value) : '';
|
||||
}
|
||||
|
||||
public function getLeaveTimeAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d H:i:s', $value) : '';
|
||||
}
|
||||
|
||||
public function getStatusTextAttr($value,$data){
|
||||
$arr = [0=>'有效', 1=>'无效'];
|
||||
return $arr[$data['status']];
|
||||
}
|
||||
|
||||
public function getAnnexAttr($value)
|
||||
{
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user