1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class HouseContract extends Base
- {
- // 新增
- public function save(){
- model('HouseContract')->add();
- HelpHander::success([],'操作成功');
- }
- // 删除
- public function del(){
- $id = input('id/d',0);
- model('HouseContract')->del($id);
- HelpHander::success([],'操作成功');
- }
- //列表
- public function list(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $intro = input('intro','','trim');
- $sn = input('sn','','trim');
- $lessee = input('lessee','','trim');
- $status = input('status','','trim');
- $ret = model('HouseContract')->lists($page,$size,$intro,$sn,$lessee,$status,$this->userId,$this->orgId);
- HelpHander::success($ret);
- }
- //未完善合同列表
- public function list2(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $intro = input('intro','','trim');
- $sn = input('sn','','trim');
- $status = input('status','','trim');
- $ret = model('HouseContract')->lists2($page,$size,$intro,$sn,$status,$this->userId,$this->orgId);
- HelpHander::success($ret);
- }
- //详情
- public function detail(){
- $id = input('id/d',0);
- $ret = model('HouseContract')->info($id);
- HelpHander::success($ret);
- }
- //承租房屋列表
- public function house(){
- $id = input('id/d',0);
- $ret = model('HouseContract')->house($id);
- HelpHander::success($ret);
- }
- // 终止合同
- public function stop(){
- $id = input('id/d',0);
- model('HouseContract')->stop($id);
- HelpHander::success([],'操作成功');
- }
- //列表
- public function listByHouse(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $houseId = input('houseId/d','','trim');
- $ret = model('HouseContract')->listByHouse($page,$size,$houseId,$this->userId,$this->orgId);
- HelpHander::success($ret);
- }
- }
|