update
This commit is contained in:
parent
87da2cc5b0
commit
6ac84f8167
@ -18,6 +18,9 @@ namespace app\adminapi\logic\manage_basic;
|
|||||||
use app\common\model\manage_basic\ManageCompany;
|
use app\common\model\manage_basic\ManageCompany;
|
||||||
use app\common\model\manage_basic\ManageProject;
|
use app\common\model\manage_basic\ManageProject;
|
||||||
use app\common\logic\BaseLogic;
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\manage_communication\ManageAcceptDoc;
|
||||||
|
use app\common\model\manage_communication\ManageInfoReport;
|
||||||
|
use app\common\model\manage_communication\ManageSendDoc;
|
||||||
use app\common\model\manage_invest\ManageEngineeringChanges;
|
use app\common\model\manage_invest\ManageEngineeringChanges;
|
||||||
use app\common\model\manage_invest\ManageMeteredPayment;
|
use app\common\model\manage_invest\ManageMeteredPayment;
|
||||||
use app\common\model\manage_progress\ManageMonthlyProgressReport;
|
use app\common\model\manage_progress\ManageMonthlyProgressReport;
|
||||||
@ -149,25 +152,43 @@ class ManageProjectLogic extends BaseLogic
|
|||||||
//获取参建单位
|
//获取参建单位
|
||||||
$company = ManageCompany::where('project_id','in',$params['id'])->findOrEmpty();
|
$company = ManageCompany::where('project_id','in',$params['id'])->findOrEmpty();
|
||||||
if(!$company->isEmpty()){
|
if(!$company->isEmpty()){
|
||||||
self::setError('该数据下存在参建单位信息,须删除参建单位信息');
|
self::setError('该数据关联了参建单位信息,须删除参建单位信息');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//获取计量支付信息
|
//获取计量支付信息
|
||||||
$metered_payment = ManageMeteredPayment::where('project_id','in',$params['id'])->findOrEmpty();
|
$metered_payment = ManageMeteredPayment::where('project_id','in',$params['id'])->findOrEmpty();
|
||||||
if(!$metered_payment->isEmpty()){
|
if(!$metered_payment->isEmpty()){
|
||||||
self::setError('该数据下存在计量支付信息,须删除计量支付信息');
|
self::setError('该数据关联了计量支付信息,须删除计量支付信息');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//获取工程变更信息
|
//获取工程变更信息
|
||||||
$engineering_changes = ManageEngineeringChanges::where('project_id','in',$params['id'])->findOrEmpty();
|
$engineering_changes = ManageEngineeringChanges::where('project_id','in',$params['id'])->findOrEmpty();
|
||||||
if(!$engineering_changes->isEmpty()){
|
if(!$engineering_changes->isEmpty()){
|
||||||
self::setError('该数据下存在工程变更信息,须删除工程变更信息');
|
self::setError('该数据关联了工程变更信息,须删除工程变更信息');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//获取工程进度月报信息
|
//获取工程进度月报信息
|
||||||
$progress_report = ManageMonthlyProgressReport::where('project_id','in',$params['id'])->findOrEmpty();
|
$progress_report = ManageMonthlyProgressReport::where('project_id','in',$params['id'])->findOrEmpty();
|
||||||
if(!$progress_report->isEmpty()){
|
if(!$progress_report->isEmpty()){
|
||||||
self::setError('该数据下存在进度月报信息,须删除进度月报信息');
|
self::setError('该数据关联了工程进度月报信息,须删除工程进度月报信息');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//收文管理
|
||||||
|
$accept_doc = ManageAcceptDoc::where('project_id','in',$params['id'])->findOrEmpty();
|
||||||
|
if(!$accept_doc->isEmpty()){
|
||||||
|
self::setError('该数据关联了收文管理信息,须删除收文管理信息');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//发文管理
|
||||||
|
$send_doc = ManageSendDoc::where('project_id','in',$params['id'])->findOrEmpty();
|
||||||
|
if(!$send_doc->isEmpty()){
|
||||||
|
self::setError('该数据关联了发文管理信息,须删除发文管理信息');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//项目信息上报
|
||||||
|
$info_report = ManageInfoReport::where('project_id','in',$params['id'])->findOrEmpty();
|
||||||
|
if(!$info_report->isEmpty()){
|
||||||
|
self::setError('该数据关联了项目信息上报信息,须删除项目信息上报信息');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return ManageProject::destroy($params['id']);
|
return ManageProject::destroy($params['id']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user