This commit is contained in:
weiz 2023-12-22 10:41:53 +08:00
parent 36a541fc4f
commit 86fb82993a

View File

@ -20,6 +20,7 @@ use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\build\BuildProcessSettingsLists;
use app\adminapi\logic\build\BuildProcessSettingsLogic;
use app\adminapi\validate\build\BuildProcessSettingsValidate;
use app\common\model\build\BuildProcessSettings;
/**
@ -103,6 +104,30 @@ class BuildProcessSettingsController extends BaseAdminController
$result = BuildProcessSettingsLogic::detail($params);
return $this->data($result);
}
//获取某个分部工程下的施工工序
public function listToDivision(): \think\response\Json
{
$params = $this->request->get(['division_id','page_size','page_no']);
if(empty($params['division_id'])){
return $this->fail('参数错误');
}
$pageNo = empty($params['page_no']) ? 1 : $params['page_no'];
$pageSize = empty($params['page_size']) ? 15 : $params['page_size'];
$data = BuildProcessSettings::field('id,process_step_no,process_step,quality_control_points,file')
->where('division_id',$params['division_id'])
->page($pageNo,$pageSize)
->order('id desc')
->select()->toArray();
$count = BuildProcessSettings::field('id,process_step_no,process_step,quality_control_points,file')->where('division_id',$params['division_id'])->count();
$result = [
'count' => $count,
'page_no' => $pageNo,
'page_size' => $pageSize,
'lists' => $data
];
return $this->success('请求成功',$result);
}
}