dataLists(new AssetLeaseLists()); } /** * @notes 添加资产 * @return \think\response\Json * @author heshihu * @date 2022/2/22 9:57 */ public function add() { $params = (new AssetLeaseValidate())->post()->goCheck('add'); $params['referee_uid'] =$this->adminId; $result =AssetLeaseLists::add($params); if ($result['code'] <> 200) { return $this->fail($result['msg']); } return $this->success($result['msg'], [], 1, 1); } /** * @notes 编辑资产 * @return \think\response\Json * @author heshihu * @date 2022/2/22 10:12 */ public function edit() { $params = (new AssetLeaseValidate())->post()->goCheck('edit'); $params['referee_uid'] =$this->adminId; $result = AssetLeaseLists::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(AssetLeaseLists::getError()); } /** * @notes 租赁详情 * @return \think\response\Json * @author heshihu * @date 2022/2/22 10:15 */ public function detail() { $params = (new AssetLeaseValidate())->goCheck('detail'); $result = AssetLeaseLists::detail($params); return $this->data($result); } /** * @notes 获取可租赁房产 * @return \think\response\Json * @author 段誉 * @date 2022/3/29 11:18 */ public function getAssetForRent() { $params = $this->request->get(); $result = AssetLists::getRentAssetList($params); return $this->success('查询成功', $result, 1, 1); } public function getApprovalSattusDesc(){ $list = AssetEnum::APPROVAL_STATUS_SCENE; $params = $this->request->get(); if(isset($params['flag'])){ if($params['flag']){ $lists =[ ['id'=>0,'status_desc'=>'全部']]; $list = array_merge($lists,$list); } } return $this->success('查询成功',$list, 1, 1); } public function doApprove(){ $params = (new AssetLeaseValidate())->post()->goCheck('approve'); $params['approve_uid'] =$this->adminId; $result = AssetLeaseLists::approve($params); if (true === $result) { return $this->success('审核完成!', [], 1, 1); } return $this->fail(AssetLeaseLists::getError()); } public function updatePayStatus(){ $params = (new AssetLeaseValidate())->post()->goCheck('pay'); $result = AssetLeaseLists::updatePayStatus($params); if (true === $result) { return $this->success('修改成功!', [], 1, 1); } return $this->fail(AssetLeaseLists::getError()); } public function autoUpdataLeaseStatus(){ $result = AssetLeaseLists::autoUpdateStatus(); return $this->success('更新成功',[], 1, 1); } public function setEnd(){ $params = (new AssetLeaseValidate())->post()->goCheck('end'); $params['approve_uid'] =$this->adminId; $result = AssetLeaseLists::setEnd($params); if (true === $result) { return $this->success('终止成功', [], 1, 1); } return $this->fail(AssetLeaseLists::getError()); } }