engineering/app/common/model/supervision_dangerous/SupervisionHighRiskSecurityMonitoring.php

94 lines
2.8 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\common\model\supervision_dangerous;
use app\common\model\BaseModel;
use app\common\model\dict\DictData;
use think\model\concern\SoftDelete;
/**
* 工程监理--危险性较大的工程安全监控模型
* Class SupervisionHighRiskSecurityMonitoring
* @package app\common\model\supervision_dangerous
*/
class SupervisionHighRiskSecurityMonitoring extends BaseModel
{
use SoftDelete;
protected $name = 'supervision_high_risk_security_monitoring';
protected $deleteTime = 'delete_time';
public function getPartialProjectTextAttr($value,$data){
$dict = DictData::where('type_value','partial_project')->column('name','value');
return !empty($data['partial_project']) ? $dict[$data['partial_project']] : '';
}
public function getIsReportTextAttr($value,$data): string
{
$arr = [0=>'否', 1=>'是'];
return $arr[$data['is_report']];
}
public function getIsAgreeTextAttr($value,$data): string
{
$arr = [0=>'否', 1=>'是'];
return $arr[$data['is_agree']];
}
public function getIsAcceptTextAttr($value,$data): string
{
$arr = [0=>'否', 1=>'是'];
return $arr[$data['is_accept']];
}
public function getIsAcceptToPlanTextAttr($value,$data): string
{
$arr = [0=>'否', 1=>'是'];
return $arr[$data['is_accept_to_plan']];
}
public function getExceedTheControlValueTextAttr($value,$data): string
{
$arr = [0=>'否', 1=>'是'];
return $arr[$data['exceed_the_control_value']];
}
public function getExceedTheWarningValueTextAttr($value,$data): string
{
$arr = [0=>'否', 1=>'是'];
return $arr[$data['exceed_the_warning_value']];
}
public function getattribution_dateAttr($value): string
{
return !empty($value) ? date('Y-m',$value) : '';
}
public function getPlannedConstructionTimeAttr($value): string
{
return !empty($value) ? date('Y-m-d',$value) : '';
}
public function getActualConstructionTimeAttr($value): string
{
return !empty($value) ? date('Y-m-d',$value) : '';
}
public function getCheckTimeAttr($value): string
{
return !empty($value) ? date('Y-m-d',$value) : '';
}
}