request->get(); try { validate(Page::class)->check($page); }catch (ValidateException $e){ return $this->JsonError($e->getError()); } return $this->JsonSucess(CheckService::getCheckList($page,getXzqdmSub())); } /** * @Apidoc\Title("获取待检检查列表") * @Apidoc\Tag("巡检") * @Apidoc\Method ("GET") * @Apidoc\Author ("ihavoc") * @Route("getWaitCheckList",method="GET") * @Middleware({"jwt"}) */ public function getWaitCheckList(): Json { $page = $this->request->get(); try { validate(Page::class)->check($page); }catch (ValidateException $e){ return $this->JsonError($e->getError()); } $res = EnterprisesService::getEnterPrisesList($page, getXzqdmSub()); foreach ($res["row"] as $key => $value){ $res["row"][$key]["townsc"]=ZdXzqService::getXzqDetail($value["towns"]); $res["row"][$key]["countryc"] = ZdXzqService::getXzqDetail(str_pad(substr($value["towns"],0,6),9,'0')); $res["row"][$key]["cityc"] = ZdXzqService::getXzqDetail(str_pad(substr($value["towns"],0,4),9,'0')); } return $this->JsonSucess($res); } /** * @Apidoc\Title("获取现场检查项目16项总表列表") * @Apidoc\Tag("巡检") * @Apidoc\Method ("GET") * @Apidoc\Author ("郑雪瑞") * @Route("getCheckDict",method="GET") * @Middleware({"jwt"}) */ public function getCheckDict():Json { return $this->JsonSucess(CheckClassService::getCheckDict()); } /** * @Apidoc\Title("获取现场检查项目详情列表根据check_class_id") * @Apidoc\Tag("巡检") * @Apidoc\Method ("GET") * @Apidoc\Author ("郑雪瑞") * @Route("getCheckDetailDict",method="GET") * @Middleware({"jwt"}) */ public function getCheckDetailDict():Json { $id = $this->request->get(); try { validate(Id::class)->check($id); }catch (ValidateException $e){ } return $this->JsonSucess(CheckClassService::getCheckDetailByCheckId($id["id"])); } /** * @Apidoc\Title("添加检查信息") * @Apidoc\Tag("巡检") * @Apidoc\Method ("POST") * @Apidoc\Author ("ihavoc") * @Route("addCheckInfo",method="POST") * @Middleware({"jwt"}) */ public function addCheckInfo(): Json { $data=$this->request->post(); $data["is_pass"]=0; $data["nopass"]=0; for ($i=0;$iJsonSucess(); } }