12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class AttendanceAddr extends Base
- {
- // 列表
- public function list(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $title = input('title','','trim');
- $ret = model('AttendanceAddr')->lists($page,$size,$title,$this->orgId);
- HelpHander::success($ret);
- }
- // 新增
- public function save(){
- model('AttendanceAddr')->add();
- HelpHander::success([],'操作成功');
- }
- // 编辑
- public function update(){
- model('AttendanceAddr')->add();
- HelpHander::success([],'操作成功');
- }
- // 删除
- public function del(){
- $id = input('id/d',0);
- model('AttendanceAddr')->del($id);
- HelpHander::success([],'操作成功');
- }
- // 详情
- public function detail(){
- $id = input('id/d',0);
- $ret = model('AttendanceAddr')->info($id);
- HelpHander::success($ret);
- }
- public function modifyStatus(){
- $id = input('id/d',0);
- model('AttendanceAddr')->modifyStatus($id);
- HelpHander::success([],'操作成功');
- }
- public function availableAddrList(){
- $deviceSn = input('deviceSn','','trim');
- $lat = input('lat','','trim');
- $lng = input('lng','','trim');
- $ret = model('AttendanceAddr')->availableAddrList($deviceSn,$lat,$lng);
- HelpHander::success($ret);
- }
- public function all(){
- $ret = model('AttendanceAddr')->all($this->orgId);
- HelpHander::success($ret);
- }
- }
|