12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\App;
- use think\Db;
- use think\exception\Handle;
- class CleanPlanRecord extends Base
- {
- public function __construct(App $app = null) {
- parent::__construct($app);
- $this->model = new \app\common\model\CleanPlanRecord();
- }
- public function detail(){
- $id=input('id/d',0);
- $ret=$this->model->detail($id,$this->orgId);
- if($ret){
- HelpHander::success($ret);
- }else{
- HelpHander::error('暂无信息');
- }
- }
- public function list(){
- $page=input('page',1);
- $size=input('size',10);
- $status=input('status/d',0);
- $day=input('day');
- $userId=$this->userId;
- $ret=$this->model->lists($page,$size,$status,$day,$userId,$this->orgId);
- HelpHander::success($ret);
- }
- public function finish(){
- $content = input('content','','trim');
- $imgs = input('imgs','','trim');
- $id =input('id/d',0);
- if(!$content){
- HelpHander::error('汇报内容不能为空');
- }
- $ret=$this->model->finish($id,$content,$imgs,$this->userId,$this->orgId);
- if(!$ret){
- HelpHander::error($this->model->getError());
- }
- HelpHander::success([],'操作成功');
- }
- }
|