update
This commit is contained in:
parent
a48e6e7ebd
commit
e765b6f435
@ -33,27 +33,27 @@ class CustomService extends BaseModel
|
||||
|
||||
public function getDateAttr($value): string
|
||||
{
|
||||
return empty($value) ? '' : date('Y-m-d', $value);
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getDoneDateAttr($value): string
|
||||
{
|
||||
return empty($value) ? '' : date('Y-m-d', $value);
|
||||
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||
}
|
||||
|
||||
public function getClassificationTextAttr($value,$data){
|
||||
$dictData = DictData::where('type_value','classification')->column('name','value');
|
||||
return $dictData[$data['classification']];
|
||||
$dict = DictData::where('type_value','classification')->column('name','value');
|
||||
return !empty($data['classification']) ? $dict[$data['classification']] : '';
|
||||
}
|
||||
|
||||
public function getUrgencyTextAttr($value,$data){
|
||||
$dictData = DictData::where('type_value','urgency')->column('name','value');
|
||||
return $dictData[$data['urgency']];
|
||||
$dict = DictData::where('type_value','urgency')->column('name','value');
|
||||
return !empty($data['urgency']) ? $dict[$data['urgency']] : '';
|
||||
}
|
||||
|
||||
public function getProcessingResultTextAttr($value,$data){
|
||||
$dictData = DictData::where('type_value','custom_service_solv_result')->column('name','value');
|
||||
return $dictData[$data['processing_result']];
|
||||
$dict = DictData::where('type_value','custom_service_solv_result')->column('name','value');
|
||||
return !empty($data['processing_result']) ? $dict[$data['processing_result']] : '';
|
||||
}
|
||||
|
||||
public function getIsSolveTextAttr($value,$data): string
|
||||
@ -64,7 +64,7 @@ class CustomService extends BaseModel
|
||||
|
||||
public function getAnnexAttr($value)
|
||||
{
|
||||
return empty($value) ? null : json_decode($value,true);
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user