新增项目咨询模块
This commit is contained in:
parent
69619f7eb8
commit
8ee524e968
@ -0,0 +1,111 @@
|
||||
<?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\consult_basic;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_basic\ConsultNewStartProjectLists;
|
||||
use app\adminapi\logic\consult_basic\ConsultNewStartProjectLogic;
|
||||
use app\adminapi\validate\consult_basic\ConsultNewStartProjectValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--新开工项目管理控制器
|
||||
* Class ConsultNewStartProjectController
|
||||
* @package app\adminapi\controller\consult_basic
|
||||
*/
|
||||
class ConsultNewStartProjectController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--新开工项目管理列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultNewStartProjectLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--新开工项目管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultNewStartProjectValidate())->post()->goCheck('add');
|
||||
$result = ConsultNewStartProjectLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultNewStartProjectLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--新开工项目管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultNewStartProjectValidate())->post()->goCheck('edit');
|
||||
$result = ConsultNewStartProjectLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultNewStartProjectLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--新开工项目管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultNewStartProjectValidate())->post()->goCheck('delete');
|
||||
$result = ConsultNewStartProjectLogic::delete($params);
|
||||
if (true === $result) {
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultNewStartProjectLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--新开工项目管理详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultNewStartProjectValidate())->goCheck('detail');
|
||||
$result = ConsultNewStartProjectLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
<?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\consult_basic;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_basic\ConsultProjectLists;
|
||||
use app\adminapi\logic\consult_basic\ConsultProjectLogic;
|
||||
use app\adminapi\validate\consult_basic\ConsultProjectValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 基本信息控制器
|
||||
* Class ConsultProjectController
|
||||
* @package app\adminapi\controller\consult_basic
|
||||
*/
|
||||
class ConsultProjectController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取基本信息列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultProjectLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加基本信息
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultProjectValidate())->post()->goCheck('add');
|
||||
$result = ConsultProjectLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultProjectLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑基本信息
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultProjectValidate())->post()->goCheck('edit');
|
||||
$result = ConsultProjectLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultProjectLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除基本信息
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultProjectValidate())->post()->goCheck('delete');
|
||||
$result = ConsultProjectLogic::delete($params);
|
||||
if (true === $result) {
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultProjectLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取基本信息详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultProjectValidate())->goCheck('detail');
|
||||
$result = ConsultProjectLogic::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\consult_basic;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_basic\ConsultProjectEvolveLists;
|
||||
use app\adminapi\logic\consult_basic\ConsultProjectEvolveLogic;
|
||||
use app\adminapi\validate\consult_basic\ConsultProjectEvolveValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--项目组工作开展情况控制器
|
||||
* Class ConsultProjectEvolveController
|
||||
* @package app\adminapi\controller\consult_basic
|
||||
*/
|
||||
class ConsultProjectEvolveController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--项目组工作开展情况列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultProjectEvolveLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--项目组工作开展情况
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultProjectEvolveValidate())->post()->goCheck('add');
|
||||
$result = ConsultProjectEvolveLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultProjectEvolveLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--项目组工作开展情况
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultProjectEvolveValidate())->post()->goCheck('edit');
|
||||
$result = ConsultProjectEvolveLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultProjectEvolveLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--项目组工作开展情况
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultProjectEvolveValidate())->post()->goCheck('delete');
|
||||
ConsultProjectEvolveLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--项目组工作开展情况详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultProjectEvolveValidate())->goCheck('detail');
|
||||
$result = ConsultProjectEvolveLogic::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\consult_basic;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_basic\ConsultProjectPreparationLists;
|
||||
use app\adminapi\logic\consult_basic\ConsultProjectPreparationLogic;
|
||||
use app\adminapi\validate\consult_basic\ConsultProjectPreparationValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--项目组后勤准备工作控制器
|
||||
* Class ConsultProjectPreparationController
|
||||
* @package app\adminapi\controller\consult_basic
|
||||
*/
|
||||
class ConsultProjectPreparationController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--项目组后勤准备工作列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultProjectPreparationLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--项目组后勤准备工作
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultProjectPreparationValidate())->post()->goCheck('add');
|
||||
$result = ConsultProjectPreparationLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultProjectPreparationLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--项目组后勤准备工作
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultProjectPreparationValidate())->post()->goCheck('edit');
|
||||
$result = ConsultProjectPreparationLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultProjectPreparationLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--项目组后勤准备工作
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultProjectPreparationValidate())->post()->goCheck('delete');
|
||||
ConsultProjectPreparationLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--项目组后勤准备工作详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultProjectPreparationValidate())->goCheck('detail');
|
||||
$result = ConsultProjectPreparationLogic::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\consult_build;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_build\ConsultAcceptLists;
|
||||
use app\adminapi\logic\consult_build\ConsultAcceptLogic;
|
||||
use app\adminapi\validate\consult_build\ConsultAcceptValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--验收管理控制器
|
||||
* Class ConsultAcceptController
|
||||
* @package app\adminapi\controller\consult_build
|
||||
*/
|
||||
class ConsultAcceptController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--验收管理列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultAcceptLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--验收管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultAcceptValidate())->post()->goCheck('add');
|
||||
$result = ConsultAcceptLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultAcceptLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--验收管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultAcceptValidate())->post()->goCheck('edit');
|
||||
$result = ConsultAcceptLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultAcceptLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--验收管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultAcceptValidate())->post()->goCheck('delete');
|
||||
ConsultAcceptLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--验收管理详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultAcceptValidate())->goCheck('detail');
|
||||
$result = ConsultAcceptLogic::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\consult_build;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_build\ConsultSceneExecuteLists;
|
||||
use app\adminapi\logic\consult_build\ConsultSceneExecuteLogic;
|
||||
use app\adminapi\validate\consult_build\ConsultSceneExecuteValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场实施管理控制器
|
||||
* Class ConsultSceneExecuteController
|
||||
* @package app\adminapi\controller\consult_build
|
||||
*/
|
||||
class ConsultSceneExecuteController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场实施管理列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultSceneExecuteLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--现场实施管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultSceneExecuteValidate())->post()->goCheck('add');
|
||||
$result = ConsultSceneExecuteLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultSceneExecuteLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--现场实施管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultSceneExecuteValidate())->post()->goCheck('edit');
|
||||
$result = ConsultSceneExecuteLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultSceneExecuteLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--现场实施管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultSceneExecuteValidate())->post()->goCheck('delete');
|
||||
ConsultSceneExecuteLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场实施管理详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultSceneExecuteValidate())->goCheck('detail');
|
||||
$result = ConsultSceneExecuteLogic::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\consult_build;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_build\ConsultSceneOrgLists;
|
||||
use app\adminapi\logic\consult_build\ConsultSceneOrgLogic;
|
||||
use app\adminapi\validate\consult_build\ConsultSceneOrgValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场组织建设控制器
|
||||
* Class ConsultSceneOrgController
|
||||
* @package app\adminapi\controller\consult_build
|
||||
*/
|
||||
class ConsultSceneOrgController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场组织建设列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultSceneOrgLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--现场组织建设
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultSceneOrgValidate())->post()->goCheck('add');
|
||||
$result = ConsultSceneOrgLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultSceneOrgLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--现场组织建设
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultSceneOrgValidate())->post()->goCheck('edit');
|
||||
$result = ConsultSceneOrgLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultSceneOrgLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--现场组织建设
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultSceneOrgValidate())->post()->goCheck('delete');
|
||||
ConsultSceneOrgLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场组织建设详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultSceneOrgValidate())->goCheck('detail');
|
||||
$result = ConsultSceneOrgLogic::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\consult_build;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_build\ConsultScenePrepareLists;
|
||||
use app\adminapi\logic\consult_build\ConsultScenePrepareLogic;
|
||||
use app\adminapi\validate\consult_build\ConsultScenePrepareValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场准备控制器
|
||||
* Class ConsultScenePrepareController
|
||||
* @package app\adminapi\controller\consult_build
|
||||
*/
|
||||
class ConsultScenePrepareController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场准备列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultScenePrepareLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--现场准备
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultScenePrepareValidate())->post()->goCheck('add');
|
||||
$result = ConsultScenePrepareLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultScenePrepareLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--现场准备
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultScenePrepareValidate())->post()->goCheck('edit');
|
||||
$result = ConsultScenePrepareLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultScenePrepareLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--现场准备
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultScenePrepareValidate())->post()->goCheck('delete');
|
||||
ConsultScenePrepareLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场准备详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultScenePrepareValidate())->goCheck('detail');
|
||||
$result = ConsultScenePrepareLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
<?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\consult_catalog;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_catalog\ConsultDirectoryLists;
|
||||
use app\adminapi\logic\consult_catalog\ConsultDirectoryLogic;
|
||||
use app\adminapi\validate\consult_catalog\ConsultDirectoryValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--全过程咨询目录控制器
|
||||
* Class ConsultDirectoryController
|
||||
* @package app\adminapi\controller\consult_catalog
|
||||
*/
|
||||
class ConsultDirectoryController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--全过程咨询目录列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultDirectoryLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--全过程咨询目录
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultDirectoryValidate())->post()->goCheck('add');
|
||||
$result = ConsultDirectoryLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultDirectoryLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--全过程咨询目录
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultDirectoryValidate())->post()->goCheck('edit');
|
||||
$result = ConsultDirectoryLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultDirectoryLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--全过程咨询目录
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultDirectoryValidate())->post()->goCheck('delete');
|
||||
$result = ConsultDirectoryLogic::delete($params);
|
||||
if (true === $result) {
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultDirectoryLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--全过程咨询目录详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultDirectoryValidate())->goCheck('detail');
|
||||
$result = ConsultDirectoryLogic::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\consult_catalog;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_catalog\ConsultSubdirectoryLists;
|
||||
use app\adminapi\logic\consult_catalog\ConsultSubdirectoryLogic;
|
||||
use app\adminapi\validate\consult_catalog\ConsultSubdirectoryValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--全过程咨询子目录控制器
|
||||
* Class ConsultSubdirectoryController
|
||||
* @package app\adminapi\controller\consult_catalog
|
||||
*/
|
||||
class ConsultSubdirectoryController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--全过程咨询子目录列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultSubdirectoryLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--全过程咨询子目录
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultSubdirectoryValidate())->post()->goCheck('add');
|
||||
$result = ConsultSubdirectoryLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultSubdirectoryLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--全过程咨询子目录
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultSubdirectoryValidate())->post()->goCheck('edit');
|
||||
$result = ConsultSubdirectoryLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultSubdirectoryLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--全过程咨询子目录
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultSubdirectoryValidate())->post()->goCheck('delete');
|
||||
ConsultSubdirectoryLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--全过程咨询子目录详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultSubdirectoryValidate())->goCheck('detail');
|
||||
$result = ConsultSubdirectoryLogic::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\consult_strategy;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_strategy\ConsultContractLists;
|
||||
use app\adminapi\logic\consult_strategy\ConsultContractLogic;
|
||||
use app\adminapi\validate\consult_strategy\ConsultContractValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--合同管理控制器
|
||||
* Class ConsultContractController
|
||||
* @package app\adminapi\controller\consult_strategy
|
||||
*/
|
||||
class ConsultContractController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--合同管理列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultContractLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--合同管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultContractValidate())->post()->goCheck('add');
|
||||
$result = ConsultContractLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultContractLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--合同管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultContractValidate())->post()->goCheck('edit');
|
||||
$result = ConsultContractLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultContractLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--合同管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultContractValidate())->post()->goCheck('delete');
|
||||
ConsultContractLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--合同管理详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultContractValidate())->goCheck('detail');
|
||||
$result = ConsultContractLogic::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\consult_strategy;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_strategy\ConsultCostLists;
|
||||
use app\adminapi\logic\consult_strategy\ConsultCostLogic;
|
||||
use app\adminapi\validate\consult_strategy\ConsultCostValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--造价管理控制器
|
||||
* Class ConsultCostController
|
||||
* @package app\adminapi\controller\consult_strategy
|
||||
*/
|
||||
class ConsultCostController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--造价管理列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultCostLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--造价管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultCostValidate())->post()->goCheck('add');
|
||||
$result = ConsultCostLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultCostLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--造价管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultCostValidate())->post()->goCheck('edit');
|
||||
$result = ConsultCostLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultCostLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--造价管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultCostValidate())->post()->goCheck('delete');
|
||||
ConsultCostLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--造价管理详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultCostValidate())->goCheck('detail');
|
||||
$result = ConsultCostLogic::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\consult_strategy;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_strategy\ConsultDeclareLists;
|
||||
use app\adminapi\logic\consult_strategy\ConsultDeclareLogic;
|
||||
use app\adminapi\validate\consult_strategy\ConsultDeclareValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--报建管理控制器
|
||||
* Class ConsultDeclareController
|
||||
* @package app\adminapi\controller\consult_strategy
|
||||
*/
|
||||
class ConsultDeclareController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--报建管理列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultDeclareLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--报建管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultDeclareValidate())->post()->goCheck('add');
|
||||
$result = ConsultDeclareLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultDeclareLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--报建管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultDeclareValidate())->post()->goCheck('edit');
|
||||
$result = ConsultDeclareLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultDeclareLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--报建管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultDeclareValidate())->post()->goCheck('delete');
|
||||
ConsultDeclareLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--报建管理详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultDeclareValidate())->goCheck('detail');
|
||||
$result = ConsultDeclareLogic::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\consult_strategy;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_strategy\ConsultDesignLists;
|
||||
use app\adminapi\logic\consult_strategy\ConsultDesignLogic;
|
||||
use app\adminapi\validate\consult_strategy\ConsultDesignValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--设计管理控制器
|
||||
* Class ConsultDesignController
|
||||
* @package app\adminapi\controller\consult_strategy
|
||||
*/
|
||||
class ConsultDesignController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--设计管理列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultDesignLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--设计管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultDesignValidate())->post()->goCheck('add');
|
||||
$result = ConsultDesignLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultDesignLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--设计管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultDesignValidate())->post()->goCheck('edit');
|
||||
$result = ConsultDesignLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultDesignLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--设计管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultDesignValidate())->post()->goCheck('delete');
|
||||
ConsultDesignLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--设计管理详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultDesignValidate())->goCheck('detail');
|
||||
$result = ConsultDesignLogic::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\consult_strategy;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_strategy\ConsultProcureLists;
|
||||
use app\adminapi\logic\consult_strategy\ConsultProcureLogic;
|
||||
use app\adminapi\validate\consult_strategy\ConsultProcureValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--招采管理控制器
|
||||
* Class ConsultProcureController
|
||||
* @package app\adminapi\controller\consult_strategy
|
||||
*/
|
||||
class ConsultProcureController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--招采管理列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultProcureLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--招采管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultProcureValidate())->post()->goCheck('add');
|
||||
$result = ConsultProcureLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultProcureLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--招采管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultProcureValidate())->post()->goCheck('edit');
|
||||
$result = ConsultProcureLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultProcureLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--招采管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultProcureValidate())->post()->goCheck('delete');
|
||||
ConsultProcureLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--招采管理详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultProcureValidate())->goCheck('detail');
|
||||
$result = ConsultProcureLogic::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\consult_target;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_target\ConsultControlLists;
|
||||
use app\adminapi\logic\consult_target\ConsultControlLogic;
|
||||
use app\adminapi\validate\consult_target\ConsultControlValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--总控管理控制器
|
||||
* Class ConsultControlController
|
||||
* @package app\adminapi\controller\consult_target
|
||||
*/
|
||||
class ConsultControlController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--总控管理列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultControlLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--总控管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultControlValidate())->post()->goCheck('add');
|
||||
$result = ConsultControlLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultControlLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--总控管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultControlValidate())->post()->goCheck('edit');
|
||||
$result = ConsultControlLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultControlLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--总控管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultControlValidate())->post()->goCheck('delete');
|
||||
ConsultControlLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--总控管理详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultControlValidate())->goCheck('detail');
|
||||
$result = ConsultControlLogic::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\consult_target;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_target\ConsultDecisionLists;
|
||||
use app\adminapi\logic\consult_target\ConsultDecisionLogic;
|
||||
use app\adminapi\validate\consult_target\ConsultDecisionValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--决策管理控制器
|
||||
* Class ConsultDecisionController
|
||||
* @package app\adminapi\controller\consult_target
|
||||
*/
|
||||
class ConsultDecisionController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--决策管理列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultDecisionLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--决策管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultDecisionValidate())->post()->goCheck('add');
|
||||
$result = ConsultDecisionLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultDecisionLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--决策管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultDecisionValidate())->post()->goCheck('edit');
|
||||
$result = ConsultDecisionLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultDecisionLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--决策管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultDecisionValidate())->post()->goCheck('delete');
|
||||
ConsultDecisionLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--决策管理详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultDecisionValidate())->goCheck('detail');
|
||||
$result = ConsultDecisionLogic::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\consult_target;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_target\ConsultDemandLists;
|
||||
use app\adminapi\logic\consult_target\ConsultDemandLogic;
|
||||
use app\adminapi\validate\consult_target\ConsultDemandValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--需求研究及管理控制器
|
||||
* Class ConsultDemandController
|
||||
* @package app\adminapi\controller\consult_target
|
||||
*/
|
||||
class ConsultDemandController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--需求研究及管理列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultDemandLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--需求研究及管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultDemandValidate())->post()->goCheck('add');
|
||||
$result = ConsultDemandLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultDemandLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--需求研究及管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultDemandValidate())->post()->goCheck('edit');
|
||||
$result = ConsultDemandLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultDemandLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--需求研究及管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultDemandValidate())->post()->goCheck('delete');
|
||||
ConsultDemandLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--需求研究及管理详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultDemandValidate())->goCheck('detail');
|
||||
$result = ConsultDemandLogic::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\consult_target;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\consult_target\ConsultReceiveLists;
|
||||
use app\adminapi\logic\consult_target\ConsultReceiveLogic;
|
||||
use app\adminapi\validate\consult_target\ConsultReceiveValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--接收管理控制器
|
||||
* Class ConsultReceiveController
|
||||
* @package app\adminapi\controller\consult_target
|
||||
*/
|
||||
class ConsultReceiveController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--接收管理列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ConsultReceiveLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--接收管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ConsultReceiveValidate())->post()->goCheck('add');
|
||||
$result = ConsultReceiveLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultReceiveLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--接收管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ConsultReceiveValidate())->post()->goCheck('edit');
|
||||
$result = ConsultReceiveLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ConsultReceiveLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--接收管理
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new ConsultReceiveValidate())->post()->goCheck('delete');
|
||||
ConsultReceiveLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--接收管理详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ConsultReceiveValidate())->goCheck('detail');
|
||||
$result = ConsultReceiveLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\consult_basic;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultNewStartProject;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--新开工项目管理列表
|
||||
* Class ConsultNewStartProjectLists
|
||||
* @package app\adminapi\listsconsult_basic
|
||||
*/
|
||||
class ConsultNewStartProjectLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id'],
|
||||
'%like%' => ['address', 'service_scope', 'basic_type', 'duration'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--新开工项目管理列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultNewStartProject::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'address', 'service_scope', 'area', 'invest', 'basic_type', 'duration'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--新开工项目管理数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultNewStartProject::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\consult_basic;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProjectEvolve;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--项目组工作开展情况列表
|
||||
* Class ConsultProjectEvolveLists
|
||||
* @package app\adminapi\listsconsult_basic
|
||||
*/
|
||||
class ConsultProjectEvolveLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['new_start_project_id'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--项目组工作开展情况列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultProjectEvolve::where($this->searchWhere)
|
||||
->field(['id', 'new_start_project_id', 'name', 'progress_status', 'resp_user'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--项目组工作开展情况数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultProjectEvolve::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
80
app/adminapi/lists/consult_basic/ConsultProjectLists.php
Normal file
80
app/adminapi/lists/consult_basic/ConsultProjectLists.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?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\consult_basic;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 基本信息列表
|
||||
* Class ConsultProjectLists
|
||||
* @package app\adminapi\listsconsult_basic
|
||||
*/
|
||||
class ConsultProjectLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'%like%' => ['project_name', 'project_code', 'company', 'contract'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取基本信息列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultProject::where($this->searchWhere)
|
||||
->field(['id', 'project_name', 'project_code', 'company', 'total_investment', 'contract', 'engineering_status', 'consult_type', 'supervision_department', 'implementation_department', 'project_manager'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$data['engineering_status_text'] = $data->engineering_status_text;
|
||||
$data['consult_type_text'] = $data->consult_type_text;
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取基本信息数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultProject::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\consult_basic;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProjectPreparation;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--项目组后勤准备工作列表
|
||||
* Class ConsultProjectPreparationLists
|
||||
* @package app\adminapi\listsconsult_basic
|
||||
*/
|
||||
class ConsultProjectPreparationLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['new_start_project_id'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--项目组后勤准备工作列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultProjectPreparation::where($this->searchWhere)
|
||||
->field(['id', 'new_start_project_id', 'name', 'progress_status', 'resp_user'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--项目组后勤准备工作数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultProjectPreparation::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
88
app/adminapi/lists/consult_build/ConsultAcceptLists.php
Normal file
88
app/adminapi/lists/consult_build/ConsultAcceptLists.php
Normal file
@ -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\consult_build;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_build\ConsultAccept;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--验收管理列表
|
||||
* Class ConsultAcceptLists
|
||||
* @package app\adminapi\listsconsult_build
|
||||
*/
|
||||
class ConsultAcceptLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'directory_id'],
|
||||
'%like%' => ['title'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--验收管理列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultAccept::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'title', 'directory_id', 'subdirectory_id'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--验收管理数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultAccept::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\consult_build;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_build\ConsultSceneExecute;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场实施管理列表
|
||||
* Class ConsultSceneExecuteLists
|
||||
* @package app\adminapi\listsconsult_build
|
||||
*/
|
||||
class ConsultSceneExecuteLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'directory_id'],
|
||||
'%like%' => ['title'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场实施管理列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultSceneExecute::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'title', 'directory_id', 'subdirectory_id'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场实施管理数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultSceneExecute::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
88
app/adminapi/lists/consult_build/ConsultSceneOrgLists.php
Normal file
88
app/adminapi/lists/consult_build/ConsultSceneOrgLists.php
Normal file
@ -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\consult_build;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_build\ConsultSceneOrg;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场组织建设列表
|
||||
* Class ConsultSceneOrgLists
|
||||
* @package app\adminapi\listsconsult_build
|
||||
*/
|
||||
class ConsultSceneOrgLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'directory_id'],
|
||||
'%like%' => ['title'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场组织建设列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultSceneOrg::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'title', 'directory_id', 'subdirectory_id'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场组织建设数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultSceneOrg::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\consult_build;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_build\ConsultScenePrepare;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场准备列表
|
||||
* Class ConsultScenePrepareLists
|
||||
* @package app\adminapi\listsconsult_build
|
||||
*/
|
||||
class ConsultScenePrepareLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'directory_id'],
|
||||
'%like%' => ['title'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场准备列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultScenePrepare::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'title', 'directory_id', 'subdirectory_id'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场准备数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultScenePrepare::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
78
app/adminapi/lists/consult_catalog/ConsultDirectoryLists.php
Normal file
78
app/adminapi/lists/consult_catalog/ConsultDirectoryLists.php
Normal file
@ -0,0 +1,78 @@
|
||||
<?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\consult_catalog;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--全过程咨询目录列表
|
||||
* Class ConsultDirectoryLists
|
||||
* @package app\adminapi\listsconsult_catalog
|
||||
*/
|
||||
class ConsultDirectoryLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['menu'],
|
||||
'%like%' => ['name'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--全过程咨询目录列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultDirectory::where($this->searchWhere)
|
||||
->field(['id', 'menu', 'name'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--全过程咨询目录数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultDirectory::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\consult_catalog;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--全过程咨询子目录列表
|
||||
* Class ConsultSubdirectoryLists
|
||||
* @package app\adminapi\listsconsult_catalog
|
||||
*/
|
||||
class ConsultSubdirectoryLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['directory_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/03/11 13:58
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultSubdirectory::where($this->searchWhere)
|
||||
->field(['id', 'directory_id', 'name'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$data['directory_name'] = $directory['name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--全过程咨询子目录数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultSubdirectory::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
88
app/adminapi/lists/consult_strategy/ConsultContractLists.php
Normal file
88
app/adminapi/lists/consult_strategy/ConsultContractLists.php
Normal file
@ -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\consult_strategy;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultContract;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--合同管理列表
|
||||
* Class ConsultContractLists
|
||||
* @package app\adminapi\listsconsult_strategy
|
||||
*/
|
||||
class ConsultContractLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'directory_id'],
|
||||
'%like%' => ['title'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--合同管理列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultContract::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'title', 'directory_id', 'subdirectory_id'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--合同管理数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultContract::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
88
app/adminapi/lists/consult_strategy/ConsultCostLists.php
Normal file
88
app/adminapi/lists/consult_strategy/ConsultCostLists.php
Normal file
@ -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\consult_strategy;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultCost;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--造价管理列表
|
||||
* Class ConsultCostLists
|
||||
* @package app\adminapi\listsconsult_strategy
|
||||
*/
|
||||
class ConsultCostLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'directory_id'],
|
||||
'%like%' => ['title'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--造价管理列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultCost::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'title', 'directory_id', 'subdirectory_id'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--造价管理数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultCost::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
88
app/adminapi/lists/consult_strategy/ConsultDeclareLists.php
Normal file
88
app/adminapi/lists/consult_strategy/ConsultDeclareLists.php
Normal file
@ -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\consult_strategy;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultDeclare;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--报建管理列表
|
||||
* Class ConsultDeclareLists
|
||||
* @package app\adminapi\listsconsult_strategy
|
||||
*/
|
||||
class ConsultDeclareLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'directory_id'],
|
||||
'%like%' => ['title'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--报建管理列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultDeclare::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'title', 'directory_id', 'subdirectory_id'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--报建管理数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultDeclare::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
78
app/adminapi/lists/consult_strategy/ConsultDesignLists.php
Normal file
78
app/adminapi/lists/consult_strategy/ConsultDesignLists.php
Normal file
@ -0,0 +1,78 @@
|
||||
<?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\consult_strategy;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_strategy\ConsultDesign;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--设计管理列表
|
||||
* Class ConsultDesignLists
|
||||
* @package app\adminapi\listsconsult_strategy
|
||||
*/
|
||||
class ConsultDesignLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'directory_id'],
|
||||
'%like%' => ['title'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--设计管理列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultDesign::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'title', 'directory_id', 'subdirectory_id'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--设计管理数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultDesign::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
88
app/adminapi/lists/consult_strategy/ConsultProcureLists.php
Normal file
88
app/adminapi/lists/consult_strategy/ConsultProcureLists.php
Normal file
@ -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\consult_strategy;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultProcure;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--招采管理列表
|
||||
* Class ConsultProcureLists
|
||||
* @package app\adminapi\listsconsult_strategy
|
||||
*/
|
||||
class ConsultProcureLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'directory_id'],
|
||||
'%like%' => ['title'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--招采管理列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultProcure::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'title', 'directory_id', 'subdirectory_id'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--招采管理数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultProcure::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
88
app/adminapi/lists/consult_target/ConsultControlLists.php
Normal file
88
app/adminapi/lists/consult_target/ConsultControlLists.php
Normal file
@ -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\consult_target;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_target\ConsultControl;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--总控管理列表
|
||||
* Class ConsultControlLists
|
||||
* @package app\adminapi\listsconsult_target
|
||||
*/
|
||||
class ConsultControlLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'directory_id'],
|
||||
'%like%' => ['title'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--总控管理列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultControl::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'title', 'directory_id', 'subdirectory_id'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--总控管理数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultControl::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
88
app/adminapi/lists/consult_target/ConsultDecisionLists.php
Normal file
88
app/adminapi/lists/consult_target/ConsultDecisionLists.php
Normal file
@ -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\consult_target;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_target\ConsultDecision;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--决策管理列表
|
||||
* Class ConsultDecisionLists
|
||||
* @package app\adminapi\listsconsult_target
|
||||
*/
|
||||
class ConsultDecisionLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'directory_id'],
|
||||
'%like%' => ['title'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--决策管理列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultDecision::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'title', 'directory_id', 'subdirectory_id'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--决策管理数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultDecision::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
88
app/adminapi/lists/consult_target/ConsultDemandLists.php
Normal file
88
app/adminapi/lists/consult_target/ConsultDemandLists.php
Normal file
@ -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\consult_target;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_target\ConsultDemand;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--需求研究及管理列表
|
||||
* Class ConsultDemandLists
|
||||
* @package app\adminapi\listsconsult_target
|
||||
*/
|
||||
class ConsultDemandLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'directory_id'],
|
||||
'%like%' => ['title'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--需求研究及管理列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultDemand::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'title', 'directory_id', 'subdirectory_id'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--需求研究及管理数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultDemand::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
88
app/adminapi/lists/consult_target/ConsultReceiveLists.php
Normal file
88
app/adminapi/lists/consult_target/ConsultReceiveLists.php
Normal file
@ -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\consult_target;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_target\ConsultReceive;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--接收管理列表
|
||||
* Class ConsultReceiveLists
|
||||
* @package app\adminapi\listsconsult_target
|
||||
*/
|
||||
class ConsultReceiveLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'directory_id'],
|
||||
'%like%' => ['title'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--接收管理列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ConsultReceive::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'title', 'directory_id', 'subdirectory_id'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--接收管理数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return ConsultReceive::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
224
app/adminapi/logic/consult_basic/ConsultNewStartProjectLogic.php
Normal file
224
app/adminapi/logic/consult_basic/ConsultNewStartProjectLogic.php
Normal file
@ -0,0 +1,224 @@
|
||||
<?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\consult_basic;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultNewStartProject;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_basic\ConsultProjectEvolve;
|
||||
use app\common\model\consult_basic\ConsultProjectPreparation;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--新开工项目管理逻辑
|
||||
* Class ConsultNewStartProjectLogic
|
||||
* @package app\adminapi\logic\consult_basic
|
||||
*/
|
||||
class ConsultNewStartProjectLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--新开工项目管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
$res = ConsultNewStartProject::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'address' => $params['address'],
|
||||
'service_scope' => $params['service_scope'],
|
||||
'area' => $params['area'],
|
||||
'invest' => $params['invest'],
|
||||
'basic_type' => $params['basic_type'],
|
||||
'duration' => $params['duration'],
|
||||
'structure_type' => $params['structure_type'] ?? '',
|
||||
'land_floors' => $params['land_floors'] ?? 0,
|
||||
'underground_floors' => $params['underground_floors'] ?? 0,
|
||||
'owner_unit' => $params['owner_unit'] ?? '',
|
||||
'owner_unit_contact' => $params['owner_unit_contact'] ?? '',
|
||||
'design_unit' => $params['design_unit'] ?? '',
|
||||
'design_unit_contact' => $params['design_unit_contact'] ?? '',
|
||||
'survey_unit' => $params['survey_unit'] ?? '',
|
||||
'survey_unit_contact' => $params['survey_unit_contact'] ?? '',
|
||||
'build_unit' => $params['build_unit'] ?? '',
|
||||
'build_unit_contact' => $params['build_unit_contact'] ?? '',
|
||||
'project_manager' => $params['project_manager'] ?? '',
|
||||
'deputy_project_manager' => $params['deputy_project_manager'] ?? '',
|
||||
'engineer' => $params['engineer'] ?? '',
|
||||
'content' => $params['content'] ?? '',
|
||||
'create_user' => $params['create_user'],
|
||||
'create_time' => !empty($params['create_time']) ? strtotime($params['create_time']) : time(),
|
||||
]);
|
||||
if(!empty($params['evolve'])) {
|
||||
foreach($params['evolve'] as $v) {
|
||||
ConsultProjectEvolve::create([
|
||||
'new_start_project_id' => $res->id,
|
||||
'name' => $v['name'],
|
||||
'progress_status' => $v['progress_status'],
|
||||
'resp_user' => $v['resp_user']
|
||||
]);
|
||||
}
|
||||
}
|
||||
if(!empty($params['preparation'])) {
|
||||
foreach($params['preparation'] as $v) {
|
||||
ConsultProjectPreparation::create([
|
||||
'new_start_project_id' => $res->id,
|
||||
'name' => $v['name'],
|
||||
'progress_status' => $v['progress_status'],
|
||||
'resp_user' => $v['resp_user']
|
||||
]);
|
||||
}
|
||||
}
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--新开工项目管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultNewStartProject::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'address' => $params['address'],
|
||||
'service_scope' => $params['service_scope'],
|
||||
'area' => $params['area'],
|
||||
'invest' => $params['invest'],
|
||||
'basic_type' => $params['basic_type'],
|
||||
'duration' => $params['duration'],
|
||||
'structure_type' => $params['structure_type'] ?? '',
|
||||
'land_floors' => $params['land_floors'] ?? 0,
|
||||
'underground_floors' => $params['underground_floors'] ?? 0,
|
||||
'owner_unit' => $params['owner_unit'] ?? '',
|
||||
'owner_unit_contact' => $params['owner_unit_contact'] ?? '',
|
||||
'design_unit' => $params['design_unit'] ?? '',
|
||||
'design_unit_contact' => $params['design_unit_contact'] ?? '',
|
||||
'survey_unit' => $params['survey_unit'] ?? '',
|
||||
'survey_unit_contact' => $params['survey_unit_contact'] ?? '',
|
||||
'build_unit' => $params['build_unit'] ?? '',
|
||||
'build_unit_contact' => $params['build_unit_contact'] ?? '',
|
||||
'project_manager' => $params['project_manager'] ?? '',
|
||||
'deputy_project_manager' => $params['deputy_project_manager'] ?? '',
|
||||
'engineer' => $params['engineer'] ?? '',
|
||||
'content' => $params['content'] ?? '',
|
||||
'create_user' => $params['create_user'],
|
||||
'create_time' => !empty($params['create_time']) ? strtotime($params['create_time']) : time(),
|
||||
]);
|
||||
if(!empty($params['evolve'])) {
|
||||
foreach($params['evolve'] as $v) {
|
||||
if(!empty($v['id'])){
|
||||
ConsultProjectEvolve::where('id',$v['id'])->update([
|
||||
'new_start_project_id' => $params['id'],
|
||||
'name' => $v['name'],
|
||||
'progress_status' => $v['progress_status'],
|
||||
'resp_user' => $v['resp_user']
|
||||
]);
|
||||
}else{
|
||||
ConsultProjectEvolve::create([
|
||||
'new_start_project_id' => $params['id'],
|
||||
'name' => $v['name'],
|
||||
'progress_status' => $v['progress_status'],
|
||||
'resp_user' => $v['resp_user']
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($params['preparation'])) {
|
||||
foreach($params['preparation'] as $v) {
|
||||
if(!empty($v['id'])){
|
||||
ConsultProjectPreparation::where('id',$v['id'])->update([
|
||||
'new_start_project_id' => $params['id'],
|
||||
'name' => $v['name'],
|
||||
'progress_status' => $v['progress_status'],
|
||||
'resp_user' => $v['resp_user']
|
||||
]);
|
||||
}else{
|
||||
ConsultProjectPreparation::create([
|
||||
'new_start_project_id' => $params['id'],
|
||||
'name' => $v['name'],
|
||||
'progress_status' => $v['progress_status'],
|
||||
'resp_user' => $v['resp_user']
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--新开工项目管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
$evolve = ConsultProjectEvolve::where('new_start_project_id','in',$params['id'])->findOrEmpty();
|
||||
if(!$evolve->isEmpty()){
|
||||
self::setError('此数据下存在项目组工作开展情况数据,须先删除项目组工作开展情况数据');
|
||||
return false;
|
||||
}
|
||||
$preparation = ConsultProjectPreparation::where('new_start_project_id','in',$params['id'])->findOrEmpty();
|
||||
if(!$preparation->isEmpty()){
|
||||
self::setError('此数据下存在项目组后勤准备工作数据,须先删除项目组后勤准备工作数据');
|
||||
return false;
|
||||
}
|
||||
return ConsultNewStartProject::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--新开工项目管理详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultNewStartProject::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
110
app/adminapi/logic/consult_basic/ConsultProjectEvolveLogic.php
Normal file
110
app/adminapi/logic/consult_basic/ConsultProjectEvolveLogic.php
Normal file
@ -0,0 +1,110 @@
|
||||
<?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\consult_basic;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProjectEvolve;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--项目组工作开展情况逻辑
|
||||
* Class ConsultProjectEvolveLogic
|
||||
* @package app\adminapi\logic\consult_basic
|
||||
*/
|
||||
class ConsultProjectEvolveLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--项目组工作开展情况
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultProjectEvolve::create([
|
||||
'new_start_project_id' => $params['new_start_project_id'],
|
||||
'name' => $params['name'],
|
||||
'progress_status' => $params['progress_status'],
|
||||
'resp_user' => $params['resp_user']
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--项目组工作开展情况
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultProjectEvolve::where('id', $params['id'])->update([
|
||||
'new_start_project_id' => $params['new_start_project_id'],
|
||||
'name' => $params['name'],
|
||||
'progress_status' => $params['progress_status'],
|
||||
'resp_user' => $params['resp_user']
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--项目组工作开展情况
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultProjectEvolve::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--项目组工作开展情况详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
return ConsultProjectEvolve::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id'])->toArray();
|
||||
}
|
||||
}
|
172
app/adminapi/logic/consult_basic/ConsultProjectLogic.php
Normal file
172
app/adminapi/logic/consult_basic/ConsultProjectLogic.php
Normal file
@ -0,0 +1,172 @@
|
||||
<?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\consult_basic;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 基本信息逻辑
|
||||
* Class ConsultProjectLogic
|
||||
* @package app\adminapi\logic\consult_basic
|
||||
*/
|
||||
class ConsultProjectLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加基本信息
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultProject::create([
|
||||
'project_name' => $params['project_name'],
|
||||
'project_code' => data_unique_code('XMZX'),
|
||||
'industry' => $params['industry'],
|
||||
'nature' => $params['nature'],
|
||||
'company' => $params['company'] ?? '',
|
||||
'build_area' => $params['build_area'],
|
||||
'address' => $params['address'] ?? '',
|
||||
'project_level' => $params['project_level'],
|
||||
'total_investment' => $params['total_investment'],
|
||||
'initiation_date' => !empty($params['initiation_date']) ? strtotime($params['initiation_date']) : 0,
|
||||
'contract' => $params['contract'] ?? '',
|
||||
'contract_amount' => $params['contract_amount'] ?? 0,
|
||||
'contract_content' => $params['contract_content'] ?? '',
|
||||
'project_overview' => $params['project_overview'] ?? '',
|
||||
'consult_content' => $params['consult_content'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'consult_start_date' => !empty($params['consult_start_date']) ? strtotime($params['consult_start_date']) : 0,
|
||||
'consult_end_date' => !empty($params['consult_end_date']) ? strtotime($params['consult_end_date']) : 0,
|
||||
'engineering_status' => $params['engineering_status'],
|
||||
'consult_type' => $params['consult_type'],
|
||||
'telephone' => $params['telephone'] ?? '',
|
||||
'consult_user' => $params['consult_user'] ?? '',
|
||||
'supervision_department' => $params['supervision_department'] ?? '',
|
||||
'implementation_department' => $params['implementation_department'] ?? '',
|
||||
'project_department' => $params['project_department'] ?? '',
|
||||
'project_manager' => $params['project_manager'] ?? '',
|
||||
'part_a_unit' => $params['part_a_unit'] ?? '',
|
||||
'project_archiving' => $params['project_archiving'] ? json_encode($params['project_archiving']) : null,
|
||||
'archiving_directory' => $params['archiving_directory'] ?? '',
|
||||
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
|
||||
'create_user' => $params['create_user'],
|
||||
'create_time' => !empty($params['create_time']) ? strtotime($params['create_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/03/11 09:25
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultProject::where('id', $params['id'])->update([
|
||||
'project_name' => $params['project_name'],
|
||||
'industry' => $params['industry'],
|
||||
'nature' => $params['nature'],
|
||||
'company' => $params['company'] ?? '',
|
||||
'build_area' => $params['build_area'],
|
||||
'address' => $params['address'] ?? '',
|
||||
'project_level' => $params['project_level'],
|
||||
'total_investment' => $params['total_investment'],
|
||||
'initiation_date' => !empty($params['initiation_date']) ? strtotime($params['initiation_date']) : 0,
|
||||
'contract' => $params['contract'] ?? '',
|
||||
'contract_amount' => $params['contract_amount'] ?? 0,
|
||||
'contract_content' => $params['contract_content'] ?? '',
|
||||
'project_overview' => $params['project_overview'] ?? '',
|
||||
'consult_content' => $params['consult_content'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'consult_start_date' => !empty($params['consult_start_date']) ? strtotime($params['consult_start_date']) : 0,
|
||||
'consult_end_date' => !empty($params['consult_end_date']) ? strtotime($params['consult_end_date']) : 0,
|
||||
'engineering_status' => $params['engineering_status'],
|
||||
'consult_type' => $params['consult_type'],
|
||||
'telephone' => $params['telephone'] ?? '',
|
||||
'consult_user' => $params['consult_user'] ?? '',
|
||||
'supervision_department' => $params['supervision_department'] ?? '',
|
||||
'implementation_department' => $params['implementation_department'] ?? '',
|
||||
'project_department' => $params['project_department'] ?? '',
|
||||
'project_manager' => $params['project_manager'] ?? '',
|
||||
'part_a_unit' => $params['part_a_unit'] ?? '',
|
||||
'project_archiving' => $params['project_archiving'] ? json_encode($params['project_archiving']) : null,
|
||||
'archiving_directory' => $params['archiving_directory'] ?? '',
|
||||
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
|
||||
'create_user' => $params['create_user'],
|
||||
'create_time' => !empty($params['create_time']) ? strtotime($params['create_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/03/11 09:25
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultProject::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取基本信息详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultProject::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$data['industry_text'] = $data->industry_text;
|
||||
$data['nature_text'] = $data->nature_text;
|
||||
$data['build_area_text'] = $data->build_area_text;
|
||||
$data['project_level_text'] = $data->project_level_text;
|
||||
$data['engineering_status_text'] = $data->engineering_status_text;
|
||||
$data['consult_type_text'] = $data->consult_type_text;
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
<?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\consult_basic;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProjectPreparation;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--项目组后勤准备工作逻辑
|
||||
* Class ConsultProjectPreparationLogic
|
||||
* @package app\adminapi\logic\consult_basic
|
||||
*/
|
||||
class ConsultProjectPreparationLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--项目组后勤准备工作
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultProjectPreparation::create([
|
||||
'new_start_project_id' => $params['new_start_project_id'],
|
||||
'name' => $params['name'],
|
||||
'progress_status' => $params['progress_status'],
|
||||
'resp_user' => $params['resp_user']
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--项目组后勤准备工作
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultProjectPreparation::where('id', $params['id'])->update([
|
||||
'new_start_project_id' => $params['new_start_project_id'],
|
||||
'name' => $params['name'],
|
||||
'progress_status' => $params['progress_status'],
|
||||
'resp_user' => $params['resp_user']
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--项目组后勤准备工作
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultProjectPreparation::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--项目组后勤准备工作详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
return ConsultProjectPreparation::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id'])->toArray();
|
||||
}
|
||||
}
|
126
app/adminapi/logic/consult_build/ConsultAcceptLogic.php
Normal file
126
app/adminapi/logic/consult_build/ConsultAcceptLogic.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\consult_build;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_build\ConsultAccept;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--验收管理逻辑
|
||||
* Class ConsultAcceptLogic
|
||||
* @package app\adminapi\logic\consult_build
|
||||
*/
|
||||
class ConsultAcceptLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--验收管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultAccept::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 16:30
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultAccept::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 16:30
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultAccept::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--验收管理详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultAccept::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
126
app/adminapi/logic/consult_build/ConsultSceneExecuteLogic.php
Normal file
126
app/adminapi/logic/consult_build/ConsultSceneExecuteLogic.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\consult_build;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_build\ConsultSceneExecute;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场实施管理逻辑
|
||||
* Class ConsultSceneExecuteLogic
|
||||
* @package app\adminapi\logic\consult_build
|
||||
*/
|
||||
class ConsultSceneExecuteLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--现场实施管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultSceneExecute::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 16:22
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultSceneExecute::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 16:22
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultSceneExecute::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场实施管理详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultSceneExecute::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
126
app/adminapi/logic/consult_build/ConsultSceneOrgLogic.php
Normal file
126
app/adminapi/logic/consult_build/ConsultSceneOrgLogic.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\consult_build;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_build\ConsultSceneOrg;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场组织建设逻辑
|
||||
* Class ConsultSceneOrgLogic
|
||||
* @package app\adminapi\logic\consult_build
|
||||
*/
|
||||
class ConsultSceneOrgLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--现场组织建设
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultSceneOrg::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 16:00
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultSceneOrg::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 16:00
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultSceneOrg::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场组织建设详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultSceneOrg::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
126
app/adminapi/logic/consult_build/ConsultScenePrepareLogic.php
Normal file
126
app/adminapi/logic/consult_build/ConsultScenePrepareLogic.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\consult_build;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_build\ConsultScenePrepare;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场准备逻辑
|
||||
* Class ConsultScenePrepareLogic
|
||||
* @package app\adminapi\logic\consult_build
|
||||
*/
|
||||
class ConsultScenePrepareLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--现场准备
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultScenePrepare::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 15:51
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultScenePrepare::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 15:51
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultScenePrepare::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--现场准备详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultScenePrepare::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
113
app/adminapi/logic/consult_catalog/ConsultDirectoryLogic.php
Normal file
113
app/adminapi/logic/consult_catalog/ConsultDirectoryLogic.php
Normal file
@ -0,0 +1,113 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\consult_catalog;
|
||||
|
||||
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--全过程咨询目录逻辑
|
||||
* Class ConsultDirectoryLogic
|
||||
* @package app\adminapi\logic\consult_catalog
|
||||
*/
|
||||
class ConsultDirectoryLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--全过程咨询目录
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultDirectory::create([
|
||||
'menu' => $params['menu'],
|
||||
'name' => $params['name']
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--全过程咨询目录
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultDirectory::where('id', $params['id'])->update([
|
||||
'menu' => $params['menu'],
|
||||
'name' => $params['name']
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--全过程咨询目录
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
$data = ConsultSubdirectory::where('directory_id','in',$params['id'])->findOrEmpty();
|
||||
if(!$data->isEmpty()){
|
||||
self::setError('此数据下存在全过程咨询子目录信息,须删除全过程咨询子目录信息');
|
||||
return false;
|
||||
}
|
||||
return ConsultDirectory::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--全过程咨询目录详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultDirectory::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
110
app/adminapi/logic/consult_catalog/ConsultSubdirectoryLogic.php
Normal file
110
app/adminapi/logic/consult_catalog/ConsultSubdirectoryLogic.php
Normal file
@ -0,0 +1,110 @@
|
||||
<?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\consult_catalog;
|
||||
|
||||
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--全过程咨询子目录逻辑
|
||||
* Class ConsultSubdirectoryLogic
|
||||
* @package app\adminapi\logic\consult_catalog
|
||||
*/
|
||||
class ConsultSubdirectoryLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--全过程咨询子目录
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultSubdirectory::create([
|
||||
'directory_id' => $params['directory_id'],
|
||||
'name' => $params['name']
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑项目咨询--全过程咨询子目录
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultSubdirectory::where('id', $params['id'])->update([
|
||||
'directory_id' => $params['directory_id'],
|
||||
'name' => $params['name']
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除项目咨询--全过程咨询子目录
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultSubdirectory::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--全过程咨询子目录详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultSubdirectory::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$data['directory_name'] = $directory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
126
app/adminapi/logic/consult_strategy/ConsultContractLogic.php
Normal file
126
app/adminapi/logic/consult_strategy/ConsultContractLogic.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultContract;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--合同管理逻辑
|
||||
* Class ConsultContractLogic
|
||||
* @package app\adminapi\logic\consult_strategy
|
||||
*/
|
||||
class ConsultContractLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--合同管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultContract::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 15:26
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultContract::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 15:26
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultContract::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--合同管理详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultContract::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
126
app/adminapi/logic/consult_strategy/ConsultCostLogic.php
Normal file
126
app/adminapi/logic/consult_strategy/ConsultCostLogic.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultCost;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--造价管理逻辑
|
||||
* Class ConsultCostLogic
|
||||
* @package app\adminapi\logic\consult_strategy
|
||||
*/
|
||||
class ConsultCostLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--造价管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultCost::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 15:33
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultCost::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 15:33
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultCost::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--造价管理详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultCost::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
126
app/adminapi/logic/consult_strategy/ConsultDeclareLogic.php
Normal file
126
app/adminapi/logic/consult_strategy/ConsultDeclareLogic.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultDeclare;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--报建管理逻辑
|
||||
* Class ConsultDeclareLogic
|
||||
* @package app\adminapi\logic\consult_strategy
|
||||
*/
|
||||
class ConsultDeclareLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--报建管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultDeclare::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 15:13
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultDeclare::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 15:13
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultDeclare::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--报建管理详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultDeclare::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
126
app/adminapi/logic/consult_strategy/ConsultDesignLogic.php
Normal file
126
app/adminapi/logic/consult_strategy/ConsultDesignLogic.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultDesign;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--设计管理逻辑
|
||||
* Class ConsultDesignLogic
|
||||
* @package app\adminapi\logic\consult_strategy
|
||||
*/
|
||||
class ConsultDesignLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--设计管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultDesign::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 15:41
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultDesign::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 15:41
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultDesign::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--设计管理详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultDesign::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
126
app/adminapi/logic/consult_strategy/ConsultProcureLogic.php
Normal file
126
app/adminapi/logic/consult_strategy/ConsultProcureLogic.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultProcure;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--招采管理逻辑
|
||||
* Class ConsultProcureLogic
|
||||
* @package app\adminapi\logic\consult_strategy
|
||||
*/
|
||||
class ConsultProcureLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--招采管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultProcure::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 15:20
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultProcure::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 15:20
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultProcure::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--招采管理详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultProcure::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
124
app/adminapi/logic/consult_target/ConsultControlLogic.php
Normal file
124
app/adminapi/logic/consult_target/ConsultControlLogic.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?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\consult_target;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_target\ConsultControl;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--总控管理逻辑
|
||||
* Class ConsultControlLogic
|
||||
* @package app\adminapi\logic\consult_target
|
||||
*/
|
||||
class ConsultControlLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--总控管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultControl::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 14:44
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultControl::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 14:44
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultControl::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--总控管理详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultControl::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
124
app/adminapi/logic/consult_target/ConsultDecisionLogic.php
Normal file
124
app/adminapi/logic/consult_target/ConsultDecisionLogic.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?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\consult_target;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_target\ConsultDecision;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--决策管理逻辑
|
||||
* Class ConsultDecisionLogic
|
||||
* @package app\adminapi\logic\consult_target
|
||||
*/
|
||||
class ConsultDecisionLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--决策管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultDecision::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 14:14
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultDecision::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 14:14
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultDecision::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--决策管理详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultDecision::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
124
app/adminapi/logic/consult_target/ConsultDemandLogic.php
Normal file
124
app/adminapi/logic/consult_target/ConsultDemandLogic.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?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\consult_target;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_target\ConsultDemand;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--需求研究及管理逻辑
|
||||
* Class ConsultDemandLogic
|
||||
* @package app\adminapi\logic\consult_target
|
||||
*/
|
||||
class ConsultDemandLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--需求研究及管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultDemand::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 14:36
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultDemand::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 14:36
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultDemand::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--需求研究及管理详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultDemand::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
124
app/adminapi/logic/consult_target/ConsultReceiveLogic.php
Normal file
124
app/adminapi/logic/consult_target/ConsultReceiveLogic.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?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\consult_target;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_target\ConsultReceive;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--接收管理逻辑
|
||||
* Class ConsultReceiveLogic
|
||||
* @package app\adminapi\logic\consult_target
|
||||
*/
|
||||
class ConsultReceiveLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加项目咨询--接收管理
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultReceive::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 14:52
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
ConsultReceive::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'title' => $params['title'],
|
||||
'directory_id' => $params['directory_id'],
|
||||
'subdirectory_id' => $params['subdirectory_id'],
|
||||
'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/03/11 14:52
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return ConsultReceive::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取项目咨询--接收管理详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = ConsultReceive::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$project = ConsultProject::field('project_name')->where('id',$data['project_id'])->findOrEmpty();
|
||||
$directory = ConsultDirectory::field('name')->where('id',$data['directory_id'])->findOrEmpty();
|
||||
$subdirectory = ConsultSubdirectory::field('name')->where('id',$data['subdirectory_id'])->findOrEmpty();
|
||||
$data['project_name'] = $project['project_name'];
|
||||
$data['directory_name'] = $directory['name'];
|
||||
$data['subdirectory_name'] = $subdirectory['name'];
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -0,0 +1,187 @@
|
||||
<?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\consult_basic;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultNewStartProject;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_basic\ConsultProjectEvolve;
|
||||
use app\common\model\consult_basic\ConsultProjectPreparation;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--新开工项目管理验证器
|
||||
* Class ConsultNewStartProjectValidate
|
||||
* @package app\adminapi\validate\consult_basic
|
||||
*/
|
||||
class ConsultNewStartProjectValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'address' => 'require',
|
||||
'service_scope' => 'require',
|
||||
'area' => 'require',
|
||||
'invest' => 'require|float|gt:0',
|
||||
'basic_type' => 'require',
|
||||
'duration' => 'require',
|
||||
'land_floors' => 'integer',
|
||||
'underground_floors' => 'integer',
|
||||
'create_user' => 'require',
|
||||
'create_time' => 'require|dateFormat:Y-m-d H:i:s',
|
||||
'evolve' => 'checkEvolve',
|
||||
'preparation' => 'checkPreparation',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'address' => '工程地点',
|
||||
'service_scope' => '服务范围',
|
||||
'area' => '建筑面积',
|
||||
'invest' => '投资(万元)',
|
||||
'basic_type' => '基础类型',
|
||||
'duration' => '工期',
|
||||
'structure_type' => '结构类型',
|
||||
'land_floors' => '地上层数',
|
||||
'underground_floors' => '地下层数',
|
||||
'owner_unit' => '业主单位',
|
||||
'owner_unit_contact' => '业主单位联系人及电话',
|
||||
'design_unit' => '设计单位',
|
||||
'design_unit_contact' => '设计单位联系人及电话',
|
||||
'survey_unit' => '勘察单位',
|
||||
'survey_unit_contact' => '勘察单位联系人及电话',
|
||||
'build_unit' => '施工单位',
|
||||
'build_unit_contact' => '施工单位联系人及电话',
|
||||
'project_manager' => '项目经理',
|
||||
'deputy_project_manager' => '项目副经理',
|
||||
'engineer' => '专业工程师',
|
||||
'content' => '其他事项情况说明',
|
||||
'create_user' => '填表人',
|
||||
'create_time' => '填表日期',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultNewStartProjectValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->remove('id',true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultNewStartProjectValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultNewStartProjectValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultNewStartProjectValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultNewStartProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkEvolve($value): bool|string
|
||||
{
|
||||
if(empty($value)) return true;
|
||||
if(!is_array($value)) return '项目组工作开展情况数据格式错误';
|
||||
foreach($value as $k=>$v){
|
||||
if(isset($v['id']) && !empty($v['id'])){
|
||||
$data = ConsultProjectEvolve::where('id',$v['id'])->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目组工作开展情况列表第'.($k+1).'行数据不存在';
|
||||
}
|
||||
}
|
||||
if(empty($v['name'])) return '项目组工作开展情况列表第'.($k+1).'行名称为空';
|
||||
if(empty($v['progress_status'])) return '项目组工作开展情况列表第'.($k+1).'行进展状态为空';
|
||||
if(empty($v['resp_user'])) return '项目组工作开展情况列表第'.($k+1).'行项目组跟踪责任人为空';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkPreparation($value): bool|string
|
||||
{
|
||||
if(empty($value)) return true;
|
||||
if(!is_array($value)) return '项目组后勤准备工作数据格式错误';
|
||||
foreach($value as $k=>$v){
|
||||
if(isset($v['id']) && !empty($v['id'])){
|
||||
$data = ConsultProjectPreparation::where('id',$v['id'])->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目组后勤准备工作列表第'.($k+1).'行数据不存在';
|
||||
}
|
||||
}
|
||||
if(empty($v['name'])) return '项目组后勤准备工作列表第'.($k+1).'行名称为空';
|
||||
if(empty($v['progress_status'])) return '项目组后勤准备工作列表第'.($k+1).'行进展状态为空';
|
||||
if(empty($v['resp_user'])) return '项目组后勤准备工作列表第'.($k+1).'行项目组跟踪责任人为空';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\validate\consult_basic;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultNewStartProject;
|
||||
use app\common\model\consult_basic\ConsultProjectEvolve;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--项目组工作开展情况验证器
|
||||
* Class ConsultProjectEvolveValidate
|
||||
* @package app\adminapi\validate\consult_basic
|
||||
*/
|
||||
class ConsultProjectEvolveValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'new_start_project_id' => 'require|checkNewStartProject',
|
||||
'name' => 'require',
|
||||
'progress_status' => 'require',
|
||||
'resp_user' => 'require',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'new_start_project_id' => '新开工项目管理id',
|
||||
'name' => '名称',
|
||||
'progress_status' => '进展状态',
|
||||
'resp_user' => '项目组跟踪责任人',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultProjectEvolveValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['new_start_project_id','name','progress_status','resp_user']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultProjectEvolveValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','new_start_project_id','name','progress_status','resp_user']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultProjectEvolveValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultProjectEvolveValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultProjectEvolve::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkNewStartProject($value): bool|string
|
||||
{
|
||||
$data = ConsultNewStartProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '新开工项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\validate\consult_basic;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultNewStartProject;
|
||||
use app\common\model\consult_basic\ConsultProjectPreparation;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--项目组后勤准备工作验证器
|
||||
* Class ConsultProjectPreparationValidate
|
||||
* @package app\adminapi\validate\consult_basic
|
||||
*/
|
||||
class ConsultProjectPreparationValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'new_start_project_id' => 'require|checkNewStartProject',
|
||||
'name' => 'require',
|
||||
'progress_status' => 'require',
|
||||
'resp_user' => 'require',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'new_start_project_id' => '新开工项目管理id',
|
||||
'name' => '名称',
|
||||
'progress_status' => '进展状态',
|
||||
'resp_user' => '项目组跟踪责任人',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultProjectPreparationValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['new_start_project_id','name','progress_status','resp_user']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultProjectPreparationValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','new_start_project_id','name','progress_status','resp_user']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultProjectPreparationValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultProjectPreparationValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 10:27
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultProjectPreparation::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkNewStartProject($value): bool|string
|
||||
{
|
||||
$data = ConsultNewStartProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '新开工项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
224
app/adminapi/validate/consult_basic/ConsultProjectValidate.php
Normal file
224
app/adminapi/validate/consult_basic/ConsultProjectValidate.php
Normal file
@ -0,0 +1,224 @@
|
||||
<?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\consult_basic;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\dict\DictData;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 基本信息验证器
|
||||
* Class ConsultProjectValidate
|
||||
* @package app\adminapi\validate\consult_basic
|
||||
*/
|
||||
class ConsultProjectValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_name' => 'require',
|
||||
'industry' => 'require|checkIndustry',
|
||||
'nature' => 'require|checkNature',
|
||||
'build_area' => 'require|checkBuildArea',
|
||||
'project_level' => 'require|checkProjectLevel',
|
||||
'total_investment' => 'require|float|gt:0',
|
||||
'initiation_date' => 'dateFormat:Y-m-d',
|
||||
'contract_amount' => 'float|egt:0',
|
||||
'consult_start_date' => 'dateFormat:Y-m-d',
|
||||
'consult_end_date' => 'dateFormat:Y-m-d',
|
||||
'engineering_status' => 'require|checkEngineeringStatus',
|
||||
'consult_type' => 'require|checkConsultType',
|
||||
'create_user' => 'require',
|
||||
'create_time' => 'require|dateFormat:Y-m-d H:i:s',
|
||||
'project_archiving' => 'checkProjectArchiving',
|
||||
'annex' => 'checkAnnex',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_name' => '项目名称',
|
||||
'project_code' => '项目编号',
|
||||
'industry' => '行业',
|
||||
'nature' => '性质',
|
||||
'company' => '委托单位',
|
||||
'build_area' => '建设区域',
|
||||
'address' => '项目地址',
|
||||
'project_level' => '项目级别',
|
||||
'total_investment' => '总投资(万元)',
|
||||
'initiation_date' => '立项日期',
|
||||
'contract' => '关联合同',
|
||||
'contract_amount' => '合同金额',
|
||||
'contract_content' => '合同服务内容',
|
||||
'project_overview' => '项目规模及概况',
|
||||
'consult_content' => '咨询范围',
|
||||
'remark' => '备注',
|
||||
'consult_start_date' => '咨询开始日期',
|
||||
'consult_end_date' => '咨询结束日期',
|
||||
'engineering_status' => '工程状态',
|
||||
'consult_type' => '咨询类型',
|
||||
'telephone' => '联系电话',
|
||||
'consult_user' => '委托联系人',
|
||||
'supervision_department' => '监管部门',
|
||||
'implementation_department' => '实施部门',
|
||||
'project_department' => '项目部',
|
||||
'project_manager' => '项目负责人员',
|
||||
'part_a_unit' => '甲方单位',
|
||||
'archiving_directory' => '归档目录',
|
||||
'create_user' => '创建人',
|
||||
'create_time' => '创建时间',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultProjectValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->remove('id',true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultProjectValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultProjectValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultProjectValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 09:25
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkIndustry($value): bool|string
|
||||
{
|
||||
$dict = DictData::where('type_value','supervision_project_industry')->column('value');
|
||||
if(!in_array($value,$dict)){
|
||||
return '行业数据值无效';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkNature($value): bool|string
|
||||
{
|
||||
$dict = DictData::where('type_value','supervision_project_nature')->column('value');
|
||||
if(!in_array($value,$dict)){
|
||||
return '性质数据值无效';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkBuildArea($value): bool|string
|
||||
{
|
||||
$dict = DictData::where('type_value','supervision_project_build_area')->column('value');
|
||||
if(!in_array($value,$dict)){
|
||||
return '建设区域数据值无效';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProjectLevel($value): bool|string
|
||||
{
|
||||
$dict = DictData::where('type_value','supervision_project_level')->column('value');
|
||||
if(!in_array($value,$dict)){
|
||||
return '项目级别数据值无效';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkEngineeringStatus($value): bool|string
|
||||
{
|
||||
$dict = DictData::where('type_value','supervision_project_status')->column('value');
|
||||
if(!in_array($value,$dict)){
|
||||
return '工程状态数据值无效';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkConsultType($value): bool|string
|
||||
{
|
||||
$dict = DictData::where('type_value','consult_type')->column('value');
|
||||
if(!in_array($value,$dict)){
|
||||
return '咨询类型数据值无效';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProjectArchiving($value): bool|string
|
||||
{
|
||||
if(empty($value)) return true;
|
||||
if(!is_array($value)) return '项目归档数据格式错误';
|
||||
$dict = DictData::where('type_value','project_archiving')->column('value');
|
||||
foreach($value as $v){
|
||||
if(!in_array($v,$dict)){
|
||||
return '项目归档数据值无效';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
153
app/adminapi/validate/consult_build/ConsultAcceptValidate.php
Normal file
153
app/adminapi/validate/consult_build/ConsultAcceptValidate.php
Normal file
@ -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\validate\consult_build;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_build\ConsultAccept;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--验收管理验证器
|
||||
* Class ConsultAcceptValidate
|
||||
* @package app\adminapi\validate\consult_build
|
||||
*/
|
||||
class ConsultAcceptValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'title' => 'require',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'subdirectory_id' => 'require|checkSubdirectory',
|
||||
'remark' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'title' => '文档名称',
|
||||
'directory_id' => '目录id',
|
||||
'subdirectory_id' => '子目录',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultAcceptValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultAcceptValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultAcceptValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultAcceptValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:30
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultAccept::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->where('menu',13)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkSubdirectory($value,$rule,$params): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->where('directory_id',$params['directory_id'])->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,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\validate\consult_build;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_build\ConsultSceneExecute;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场实施管理验证器
|
||||
* Class ConsultSceneExecuteValidate
|
||||
* @package app\adminapi\validate\consult_build
|
||||
*/
|
||||
class ConsultSceneExecuteValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'title' => 'require',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'subdirectory_id' => 'require|checkSubdirectory',
|
||||
'remark' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'title' => '文档名称',
|
||||
'directory_id' => '目录id',
|
||||
'subdirectory_id' => '子目录',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultSceneExecuteValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultSceneExecuteValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultSceneExecuteValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultSceneExecuteValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:22
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultSceneExecute::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->where('menu',12)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkSubdirectory($value,$rule,$params): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->where('directory_id',$params['directory_id'])->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '子目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
153
app/adminapi/validate/consult_build/ConsultSceneOrgValidate.php
Normal file
153
app/adminapi/validate/consult_build/ConsultSceneOrgValidate.php
Normal file
@ -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\validate\consult_build;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_build\ConsultSceneOrg;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场组织建设验证器
|
||||
* Class ConsultSceneOrgValidate
|
||||
* @package app\adminapi\validate\consult_build
|
||||
*/
|
||||
class ConsultSceneOrgValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'title' => 'require',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'subdirectory_id' => 'require|checkSubdirectory',
|
||||
'remark' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'title' => '文档名称',
|
||||
'directory_id' => '目录id',
|
||||
'subdirectory_id' => '子目录',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultSceneOrgValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultSceneOrgValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultSceneOrgValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultSceneOrgValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 16:00
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultSceneOrg::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->where('menu',11)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkSubdirectory($value,$rule,$params): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->where('directory_id',$params['directory_id'])->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,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\validate\consult_build;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_build\ConsultScenePrepare;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场准备验证器
|
||||
* Class ConsultScenePrepareValidate
|
||||
* @package app\adminapi\validate\consult_build
|
||||
*/
|
||||
class ConsultScenePrepareValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'title' => 'require',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'subdirectory_id' => 'require|checkSubdirectory',
|
||||
'remark' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'title' => '文档名称',
|
||||
'directory_id' => '目录id',
|
||||
'subdirectory_id' => '子目录',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultScenePrepareValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultScenePrepareValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultScenePrepareValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultScenePrepareValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:51
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultScenePrepare::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->where('menu',10)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkSubdirectory($value,$rule,$params): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->where('directory_id',$params['directory_id'])->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,118 @@
|
||||
<?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\consult_catalog;
|
||||
|
||||
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\dict\DictData;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--全过程咨询目录验证器
|
||||
* Class ConsultDirectoryValidate
|
||||
* @package app\adminapi\validate\consult_catalog
|
||||
*/
|
||||
class ConsultDirectoryValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'menu' => 'require|checkMenu',
|
||||
'name' => 'require',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'menu' => '所属菜单',
|
||||
'name' => '目录分类',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultDirectoryValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['menu','name']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultDirectoryValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','menu','name']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultDirectoryValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultDirectoryValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 11:54
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkMenu($value): bool|string
|
||||
{
|
||||
$dict = DictData::where('type_value','consult_menu')->column('value');
|
||||
if(!in_array($value,$dict)){
|
||||
return '所属菜单数据值无效';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
<?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\consult_catalog;
|
||||
|
||||
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--全过程咨询子目录验证器
|
||||
* Class ConsultSubdirectoryValidate
|
||||
* @package app\adminapi\validate\consult_catalog
|
||||
*/
|
||||
class ConsultSubdirectoryValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'name' => 'require',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'directory_id' => '所属目录',
|
||||
'name' => '子目录名称',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultSubdirectoryValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['directory_id','name']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultSubdirectoryValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','directory_id','name']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultSubdirectoryValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultSubdirectoryValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 13:58
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '所属目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,154 @@
|
||||
<?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\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultContract;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--合同管理验证器
|
||||
* Class ConsultContractValidate
|
||||
* @package app\adminapi\validate\consult_strategy
|
||||
*/
|
||||
class ConsultContractValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'title' => 'require',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'subdirectory_id' => 'require|checkSubdirectory',
|
||||
'remark' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'title' => '文档名称',
|
||||
'directory_id' => '目录id',
|
||||
'subdirectory_id' => '子目录',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultContractValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultContractValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultContractValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultContractValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:26
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultContract::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->where('menu',7)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkSubdirectory($value,$rule,$params): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->where('directory_id',$params['directory_id'])->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '子目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
153
app/adminapi/validate/consult_strategy/ConsultCostValidate.php
Normal file
153
app/adminapi/validate/consult_strategy/ConsultCostValidate.php
Normal file
@ -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\validate\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultCost;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--造价管理验证器
|
||||
* Class ConsultCostValidate
|
||||
* @package app\adminapi\validate\consult_strategy
|
||||
*/
|
||||
class ConsultCostValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'title' => 'require',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'subdirectory_id' => 'require|checkSubdirectory',
|
||||
'remark' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'title' => '文档名称',
|
||||
'directory_id' => '目录id',
|
||||
'subdirectory_id' => '子目录',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultCostValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultCostValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultCostValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultCostValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:33
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultCost::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->where('menu',8)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkSubdirectory($value,$rule,$params): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->where('directory_id',$params['directory_id'])->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,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\validate\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultDeclare;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--报建管理验证器
|
||||
* Class ConsultDeclareValidate
|
||||
* @package app\adminapi\validate\consult_strategy
|
||||
*/
|
||||
class ConsultDeclareValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'title' => 'require',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'subdirectory_id' => 'require|checkSubdirectory',
|
||||
'remark' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'title' => '文档名称',
|
||||
'directory_id' => '目录id',
|
||||
'subdirectory_id' => '子目录',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultDeclareValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultDeclareValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultDeclareValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultDeclareValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:13
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultDeclare::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->where('menu',5)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkSubdirectory($value,$rule,$params): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->where('directory_id',$params['directory_id'])->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '子目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
153
app/adminapi/validate/consult_strategy/ConsultDesignValidate.php
Normal file
153
app/adminapi/validate/consult_strategy/ConsultDesignValidate.php
Normal file
@ -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\validate\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultDesign;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--设计管理验证器
|
||||
* Class ConsultDesignValidate
|
||||
* @package app\adminapi\validate\consult_strategy
|
||||
*/
|
||||
class ConsultDesignValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'title' => 'require',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'subdirectory_id' => 'require|checkSubdirectory',
|
||||
'remark' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'title' => '文档名称',
|
||||
'directory_id' => '目录id',
|
||||
'subdirectory_id' => '子目录',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultDesignValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultDesignValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultDesignValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultDesignValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:41
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultDesign::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->where('menu',9)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkSubdirectory($value,$rule,$params): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->where('directory_id',$params['directory_id'])->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,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\validate\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_strategy\ConsultProcure;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--招采管理验证器
|
||||
* Class ConsultProcureValidate
|
||||
* @package app\adminapi\validate\consult_strategy
|
||||
*/
|
||||
class ConsultProcureValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'title' => 'require',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'subdirectory_id' => 'require|checkSubdirectory',
|
||||
'remark' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'title' => '文档名称',
|
||||
'directory_id' => '目录id',
|
||||
'subdirectory_id' => '子目录',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultProcureValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultProcureValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultProcureValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultProcureValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 15:20
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultProcure::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->where('menu',6)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkSubdirectory($value,$rule,$params): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->where('directory_id',$params['directory_id'])->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '子目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
153
app/adminapi/validate/consult_target/ConsultControlValidate.php
Normal file
153
app/adminapi/validate/consult_target/ConsultControlValidate.php
Normal file
@ -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\validate\consult_target;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_target\ConsultControl;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--总控管理验证器
|
||||
* Class ConsultControlValidate
|
||||
* @package app\adminapi\validate\consult_target
|
||||
*/
|
||||
class ConsultControlValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'title' => 'require',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'subdirectory_id' => 'require|checkSubdirectory',
|
||||
'remark' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'title' => '文档名称',
|
||||
'directory_id' => '目录id',
|
||||
'subdirectory_id' => '子目录',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultControlValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultControlValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultControlValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultControlValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:44
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultControl::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->where('menu',3)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkSubdirectory($value,$rule,$params): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->where('directory_id',$params['directory_id'])->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '子目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
153
app/adminapi/validate/consult_target/ConsultDecisionValidate.php
Normal file
153
app/adminapi/validate/consult_target/ConsultDecisionValidate.php
Normal file
@ -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\validate\consult_target;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_target\ConsultDecision;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--决策管理验证器
|
||||
* Class ConsultDecisionValidate
|
||||
* @package app\adminapi\validate\consult_target
|
||||
*/
|
||||
class ConsultDecisionValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'title' => 'require',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'subdirectory_id' => 'require|checkSubdirectory',
|
||||
'remark' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'title' => '文档名称',
|
||||
'directory_id' => '目录id',
|
||||
'subdirectory_id' => '子目录',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultDecisionValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultDecisionValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultDecisionValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultDecisionValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:14
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultDecision::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->where('menu',1)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkSubdirectory($value,$rule,$params): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->where('directory_id',$params['directory_id'])->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '子目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
153
app/adminapi/validate/consult_target/ConsultDemandValidate.php
Normal file
153
app/adminapi/validate/consult_target/ConsultDemandValidate.php
Normal file
@ -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\validate\consult_target;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_target\ConsultDemand;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--需求研究及管理验证器
|
||||
* Class ConsultDemandValidate
|
||||
* @package app\adminapi\validate\consult_target
|
||||
*/
|
||||
class ConsultDemandValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'title' => 'require',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'subdirectory_id' => 'require|checkSubdirectory',
|
||||
'remark' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'title' => '文档名称',
|
||||
'directory_id' => '目录id',
|
||||
'subdirectory_id' => '子目录',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultDemandValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultDemandValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultDemandValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultDemandValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:36
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultDemand::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->where('menu',2)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkSubdirectory($value,$rule,$params): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->where('directory_id',$params['directory_id'])->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '子目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
153
app/adminapi/validate/consult_target/ConsultReceiveValidate.php
Normal file
153
app/adminapi/validate/consult_target/ConsultReceiveValidate.php
Normal file
@ -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\validate\consult_target;
|
||||
|
||||
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\consult_catalog\ConsultDirectory;
|
||||
use app\common\model\consult_catalog\ConsultSubdirectory;
|
||||
use app\common\model\consult_target\ConsultReceive;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--接收管理验证器
|
||||
* Class ConsultReceiveValidate
|
||||
* @package app\adminapi\validate\consult_target
|
||||
*/
|
||||
class ConsultReceiveValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|checkData',
|
||||
'project_id' => 'require|checkProject',
|
||||
'title' => 'require',
|
||||
'directory_id' => 'require|checkDirectory',
|
||||
'subdirectory_id' => 'require|checkSubdirectory',
|
||||
'remark' => 'require',
|
||||
'annex' => 'checkAnnex'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'project_id' => '项目id',
|
||||
'title' => '文档名称',
|
||||
'directory_id' => '目录id',
|
||||
'subdirectory_id' => '子目录',
|
||||
'remark' => '备注',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return ConsultReceiveValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return ConsultReceiveValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','project_id','title','directory_id','subdirectory_id','remark','annex']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return ConsultReceiveValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return ConsultReceiveValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/03/11 14:52
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkData($value): bool|string
|
||||
{
|
||||
$data = ConsultReceive::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '数据不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkProject($value): bool|string
|
||||
{
|
||||
$data = ConsultProject::where('id',$value)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '项目信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDirectory($value): bool|string
|
||||
{
|
||||
$data = ConsultDirectory::where('id',$value)->where('menu',4)->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkSubdirectory($value,$rule,$params): bool|string
|
||||
{
|
||||
$data = ConsultSubdirectory::where('id',$value)->where('directory_id',$params['directory_id'])->findOrEmpty();
|
||||
if($data->isEmpty()){
|
||||
return '子目录信息不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
34
app/common/model/consult_basic/ConsultNewStartProject.php
Normal file
34
app/common/model/consult_basic/ConsultNewStartProject.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\consult_basic;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--新开工项目管理模型
|
||||
* Class ConsultNewStartProject
|
||||
* @package app\common\model\consult_basic
|
||||
*/
|
||||
class ConsultNewStartProject extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_new_start_project';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
}
|
93
app/common/model/consult_basic/ConsultProject.php
Normal file
93
app/common/model/consult_basic/ConsultProject.php
Normal file
@ -0,0 +1,93 @@
|
||||
<?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\consult_basic;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\model\dict\DictData;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 基本信息模型
|
||||
* Class ConsultProject
|
||||
* @package app\common\model\consult_basic
|
||||
*/
|
||||
class ConsultProject extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_project';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getIndustryTextAttr($value,$data){
|
||||
$dict = DictData::where('type_value','supervision_project_industry')->column('name','value');
|
||||
return !empty($data['industry']) ? $dict[$data['industry']] : '';
|
||||
}
|
||||
|
||||
public function getNatureTextAttr($value,$data){
|
||||
$dict = DictData::where('type_value','supervision_project_nature')->column('name','value');
|
||||
return !empty($data['nature']) ? $dict[$data['nature']] : '';
|
||||
}
|
||||
|
||||
public function getBuildAreaTextAttr($value,$data){
|
||||
$dict = DictData::where('type_value','supervision_project_build_area')->column('name','value');
|
||||
return !empty($data['build_area']) ? $dict[$data['build_area']] : '';
|
||||
}
|
||||
|
||||
public function getProjectLevelTextAttr($value,$data){
|
||||
$dict = DictData::where('type_value','supervision_project_level')->column('name','value');
|
||||
return !empty($data['project_level']) ? $dict[$data['project_level']] : '';
|
||||
}
|
||||
|
||||
public function getEngineeringStatusTextAttr($value,$data){
|
||||
$dict = DictData::where('type_value','supervision_project_status')->column('name','value');
|
||||
return !empty($data['engineering_status']) ? $dict[$data['engineering_status']] : '';
|
||||
}
|
||||
|
||||
public function getConsultTypeTextAttr($value,$data){
|
||||
$dict = DictData::where('type_value','consult_type')->column('name','value');
|
||||
return !empty($data['consult_type']) ? $dict[$data['consult_type']] : '';
|
||||
}
|
||||
|
||||
public function getProjectArchivingAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
public function getProjectArchivingTextAttr($value,$data): string
|
||||
{
|
||||
$dict = DictData::where('type_value','project_archiving')->whereIn('value',json_decode($data['project_archiving'],true))->column('name');
|
||||
return !empty($data['project_archiving']) ? implode(',',$dict) : '';
|
||||
}
|
||||
|
||||
public function getConsultStartDateAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getConsultEndDateAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getInitiationDateAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getAnnexAttr($value)
|
||||
{
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
34
app/common/model/consult_basic/ConsultProjectEvolve.php
Normal file
34
app/common/model/consult_basic/ConsultProjectEvolve.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\consult_basic;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--项目组工作开展情况模型
|
||||
* Class ConsultProjectEvolve
|
||||
* @package app\common\model\consult_basic
|
||||
*/
|
||||
class ConsultProjectEvolve extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_project_evolve';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
}
|
34
app/common/model/consult_basic/ConsultProjectPreparation.php
Normal file
34
app/common/model/consult_basic/ConsultProjectPreparation.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\consult_basic;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--项目组后勤准备工作模型
|
||||
* Class ConsultProjectPreparation
|
||||
* @package app\common\model\consult_basic
|
||||
*/
|
||||
class ConsultProjectPreparation extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_project_preparation';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
}
|
36
app/common/model/consult_build/ConsultAccept.php
Normal file
36
app/common/model/consult_build/ConsultAccept.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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\consult_build;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--验收管理模型
|
||||
* Class ConsultAccept
|
||||
* @package app\common\model\consult_build
|
||||
*/
|
||||
class ConsultAccept extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_accept';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
36
app/common/model/consult_build/ConsultSceneExecute.php
Normal file
36
app/common/model/consult_build/ConsultSceneExecute.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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\consult_build;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场实施管理模型
|
||||
* Class ConsultSceneExecute
|
||||
* @package app\common\model\consult_build
|
||||
*/
|
||||
class ConsultSceneExecute extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_scene_execute';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
36
app/common/model/consult_build/ConsultSceneOrg.php
Normal file
36
app/common/model/consult_build/ConsultSceneOrg.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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\consult_build;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场组织建设模型
|
||||
* Class ConsultSceneOrg
|
||||
* @package app\common\model\consult_build
|
||||
*/
|
||||
class ConsultSceneOrg extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_scene_org';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
36
app/common/model/consult_build/ConsultScenePrepare.php
Normal file
36
app/common/model/consult_build/ConsultScenePrepare.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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\consult_build;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--现场准备模型
|
||||
* Class ConsultScenePrepare
|
||||
* @package app\common\model\consult_build
|
||||
*/
|
||||
class ConsultScenePrepare extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_scene_prepare';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
38
app/common/model/consult_catalog/ConsultDirectory.php
Normal file
38
app/common/model/consult_catalog/ConsultDirectory.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\consult_catalog;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\model\dict\DictData;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--全过程咨询目录模型
|
||||
* Class ConsultDirectory
|
||||
* @package app\common\model\consult_catalog
|
||||
*/
|
||||
class ConsultDirectory extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_directory';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getMenuTextAttr($value,$data){
|
||||
$dict = DictData::where('type_value','consult_menu')->column('name','value');
|
||||
return !empty($data['menu']) ? $dict[$data['menu']] : '';
|
||||
}
|
||||
}
|
34
app/common/model/consult_catalog/ConsultSubdirectory.php
Normal file
34
app/common/model/consult_catalog/ConsultSubdirectory.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\consult_catalog;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--全过程咨询子目录模型
|
||||
* Class ConsultSubdirectory
|
||||
* @package app\common\model\consult_catalog
|
||||
*/
|
||||
class ConsultSubdirectory extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_subdirectory';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
}
|
36
app/common/model/consult_strategy/ConsultContract.php
Normal file
36
app/common/model/consult_strategy/ConsultContract.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--合同管理模型
|
||||
* Class ConsultContract
|
||||
* @package app\common\model\consult_strategy
|
||||
*/
|
||||
class ConsultContract extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_contract';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
36
app/common/model/consult_strategy/ConsultCost.php
Normal file
36
app/common/model/consult_strategy/ConsultCost.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--造价管理模型
|
||||
* Class ConsultCost
|
||||
* @package app\common\model\consult_strategy
|
||||
*/
|
||||
class ConsultCost extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_cost';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
36
app/common/model/consult_strategy/ConsultDeclare.php
Normal file
36
app/common/model/consult_strategy/ConsultDeclare.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--报建管理模型
|
||||
* Class ConsultDeclare
|
||||
* @package app\common\model\consult_strategy
|
||||
*/
|
||||
class ConsultDeclare extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_declare';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
37
app/common/model/consult_strategy/ConsultDesign.php
Normal file
37
app/common/model/consult_strategy/ConsultDesign.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--设计管理模型
|
||||
* Class ConsultDesign
|
||||
* @package app\common\model\consult_strategy
|
||||
*/
|
||||
class ConsultDesign extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_design';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
36
app/common/model/consult_strategy/ConsultProcure.php
Normal file
36
app/common/model/consult_strategy/ConsultProcure.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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\consult_strategy;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--招采管理模型
|
||||
* Class ConsultProcure
|
||||
* @package app\common\model\consult_strategy
|
||||
*/
|
||||
class ConsultProcure extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_procure';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
36
app/common/model/consult_target/ConsultControl.php
Normal file
36
app/common/model/consult_target/ConsultControl.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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\consult_target;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--总控管理模型
|
||||
* Class ConsultControl
|
||||
* @package app\common\model\consult_target
|
||||
*/
|
||||
class ConsultControl extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_control';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
36
app/common/model/consult_target/ConsultDecision.php
Normal file
36
app/common/model/consult_target/ConsultDecision.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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\consult_target;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--决策管理模型
|
||||
* Class ConsultDecision
|
||||
* @package app\common\model\consult_target
|
||||
*/
|
||||
class ConsultDecision extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_decision';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
36
app/common/model/consult_target/ConsultDemand.php
Normal file
36
app/common/model/consult_target/ConsultDemand.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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\consult_target;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--需求研究及管理模型
|
||||
* Class ConsultDemand
|
||||
* @package app\common\model\consult_target
|
||||
*/
|
||||
class ConsultDemand extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_demand';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
36
app/common/model/consult_target/ConsultReceive.php
Normal file
36
app/common/model/consult_target/ConsultReceive.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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\consult_target;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 项目咨询--接收管理模型
|
||||
* Class ConsultReceive
|
||||
* @package app\common\model\consult_target
|
||||
*/
|
||||
class ConsultReceive extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'consult_receive';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
@ -30,5 +30,7 @@ class SupervisionProjectAcceptanceReport extends BaseModel
|
||||
protected $name = 'supervision_project_acceptance_report';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user