作者 jinglong
1 个管道 的构建 通过 耗费 1 秒

修改月检搜索标题

... ... @@ -31,7 +31,7 @@ return array (
//年检
'service_test' => 8,
//提示语
'tips' => '不负重任,防患未燃! prevention is better than cure',
'tips' => '不负重任,防患未燃! prevention is better than cure',
//消防日检暂时设为乙方
'set_inspect' => 1,
//域名
... ...
... ... @@ -2768,6 +2768,22 @@ class CommonController extends RestBaseController
return $res;
}
//根据项目id获取月检title
public function getCheckTitleById($project_id){
$res = Db::name('check')
->where('project_id',$project_id)
->field('id,ins_m_time')
->order('id desc')
->select()
->toArray();
$project = $this->getProjectName($project_id);
foreach($res as &$value) {
$value['title'] = $project['project_name'] . '月检' . date('Y-m-d', $value['ins_m_time']);
unset($value['ins_m_time']);
}
return $res;
}
//乙方领导id查询独立年检title
public function getYearsTitle(){
$u_s_id_s = $this->getUidB();
... ...
... ... @@ -43,7 +43,7 @@ class ReportController extends RestBaseController
$common = new CommonController();
if($type == 1){
//月检
$res = $common->getTitleById('check',$project_id);
$res = $common->getCheckTitleById($project_id);
}else if($type == 2){
//年检
$res = $common->getTitleById('pro_check',$project_id);
... ...