update
This commit is contained in:
parent
ab86426c4c
commit
3b7a1eb39c
@ -138,7 +138,7 @@ class ManageCompanyLogic extends BaseLogic
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
$contact = ManageCompanyContacts::where('company_id',$params['id'])->findOrEmpty();
|
||||
$contact = ManageCompanyContacts::where('company_id','in',$params['id'])->findOrEmpty();
|
||||
if(!$contact->isEmpty()){
|
||||
self::setError('该数据下存在联系人信息,须删除联系人信息');
|
||||
return false;
|
||||
|
@ -147,25 +147,25 @@ class ManageProjectLogic extends BaseLogic
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
//获取参建单位
|
||||
$company = ManageCompany::where('project_id',$params['id'])->findOrEmpty();
|
||||
$company = ManageCompany::where('project_id','in',$params['id'])->findOrEmpty();
|
||||
if(!$company->isEmpty()){
|
||||
self::setError('该数据下存在参建单位信息,须删除参建单位信息');
|
||||
return false;
|
||||
}
|
||||
//获取计量支付信息
|
||||
$metered_payment = ManageMeteredPayment::where('project_id',$params['id'])->findOrEmpty();
|
||||
$metered_payment = ManageMeteredPayment::where('project_id','in',$params['id'])->findOrEmpty();
|
||||
if(!$metered_payment->isEmpty()){
|
||||
self::setError('该数据下存在计量支付信息,须删除计量支付信息');
|
||||
return false;
|
||||
}
|
||||
//获取工程变更信息
|
||||
$engineering_changes = ManageEngineeringChanges::where('project_id',$params['id'])->findOrEmpty();
|
||||
$engineering_changes = ManageEngineeringChanges::where('project_id','in',$params['id'])->findOrEmpty();
|
||||
if(!$engineering_changes->isEmpty()){
|
||||
self::setError('该数据下存在工程变更信息,须删除工程变更信息');
|
||||
return false;
|
||||
}
|
||||
//获取工程进度月报信息
|
||||
$progress_report = ManageMonthlyProgressReport::where('project_id',$params['id'])->findOrEmpty();
|
||||
$progress_report = ManageMonthlyProgressReport::where('project_id','in',$params['id'])->findOrEmpty();
|
||||
if(!$progress_report->isEmpty()){
|
||||
self::setError('该数据下存在进度月报信息,须删除进度月报信息');
|
||||
return false;
|
||||
|
@ -188,13 +188,5 @@ class ManageProjectValidate extends BaseValidate
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -125,13 +125,5 @@ class ManageAcceptDocValidate extends BaseValidate
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -148,13 +148,5 @@ class ManageInfoReportValidate extends BaseValidate
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -124,13 +124,5 @@ class ManageSendDocValidate extends BaseValidate
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -122,13 +122,5 @@ class ManageEngineeringChangesValidate extends BaseValidate
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -132,13 +132,5 @@ class ManageMonthlyProgressReportValidate extends BaseValidate
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != '' && !is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -81,8 +81,4 @@ class ManageProject extends BaseModel
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getAnnexAttr($value)
|
||||
{
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
@ -39,9 +39,4 @@ class ManageAcceptDoc extends BaseModel
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d',$value) : '';
|
||||
}
|
||||
|
||||
public function getAnnexAttr($value)
|
||||
{
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
@ -31,10 +31,6 @@ class ManageInfoReport extends BaseModel
|
||||
protected $name = 'manage_info_report';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
public function getInfoCateAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
@ -34,9 +34,4 @@ class ManageSendDoc extends BaseModel
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d',$value) : '';
|
||||
}
|
||||
|
||||
public function getAnnexAttr($value)
|
||||
{
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
@ -34,9 +34,4 @@ class ManageEngineeringChanges extends BaseModel
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d',$value) : '';
|
||||
}
|
||||
|
||||
public function getAnnexAttr($value)
|
||||
{
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
}
|
@ -40,10 +40,5 @@ class ManageMonthlyProgressReport extends BaseModel
|
||||
{
|
||||
return !empty($value) ? date('Y-m', $value) : '';
|
||||
}
|
||||
|
||||
public function getAnnexAttr($value)
|
||||
{
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user