1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class GreenTask extends Base
- {
- public function lists(){
- $page = input('page',1);
- $size = input('size',10);
- $type = input('type',1);
- $list = model('GreenTask')->lists($page,$size,$type,$this->userId,$this->orgId);
- HelpHander::success($list);
- }
- public function queryAddrList(){
- $taskId = input('taskId');
- $list = model('GreenTask')->addrList($taskId,$this->orgId,$this->userId);
- if(!$list){
- HelpHander::error('暂无信息');
- }
- HelpHander::success($list);
- }
- public function queryTaskDetail(){
- $taskId = input('taskId');
- $formId = input('greenTaskAddrId');
- $ret = model('GreenTask')->taskDetails($taskId,$formId,$this->orgId);
- if($ret){
- HelpHander::success($ret);
- }else{
- HelpHander::error('暂无信息');
- }
- }
- public function queryForms(){
- $greenTaskAddrId = input('greenTaskAddrId');
- $ret = model('GreenTask')->forms($greenTaskAddrId);
- if($ret){
- HelpHander::success($ret);
- }else{
- HelpHander::error('暂无信息');
- }
- }
- public function updateStatus(){
- $greenTaskId = input('greenTaskId');
- $interruptReson = input('interruptReson');
- $interruptImg = input('interruptImg');
- $ret = model('GreenTask')->updateStatus($greenTaskId,$interruptReson,$interruptImg);
- if($ret){
- HelpHander::success([],'修改成功');
- }else{
- HelpHander::error(model('GreenTask')->getError());
- }
- }
- }
|