更新排期
This commit is contained in:
parent
76860ba871
commit
23059469e0
@ -4,6 +4,8 @@ namespace app\middleapi\controller;
|
||||
|
||||
use app\common\model\task_scheduling\TaskScheduling;
|
||||
use app\common\model\Company;
|
||||
use app\adminapi\validate\task_scheduling\TaskSchedulingValidate;
|
||||
use app\common\logic\task_scheduling\TaskSchedulingLogic;
|
||||
use app\common\controller\BaseLikeAdminController;
|
||||
|
||||
/**
|
||||
@ -14,7 +16,6 @@ use app\common\controller\BaseLikeAdminController;
|
||||
class TaskSchedulingController extends BaseLikeAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取任务公司排期列表
|
||||
* @return \think\response\Json
|
||||
@ -54,26 +55,6 @@ class TaskSchedulingController extends BaseLikeAdminController
|
||||
return $this->success('请求成功',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加任务公司排期
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/08/08 10:08
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
return $this->fail('暂未开放');
|
||||
$params = (new TaskSchedulingValidate())->post()->goCheck('add');
|
||||
$params['create_user_id']=$this->adminId;
|
||||
$result = TaskSchedulingLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(TaskSchedulingLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑任务公司排期
|
||||
* @return \think\response\Json
|
||||
@ -89,11 +70,18 @@ class TaskSchedulingController extends BaseLikeAdminController
|
||||
}
|
||||
return $this->fail(TaskSchedulingLogic::getError());
|
||||
}
|
||||
|
||||
//编辑金额
|
||||
public function editMoney()
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$moeny=$params['money'];
|
||||
if(empty($params['id'])){
|
||||
return $this->fail('缺少必要参数id');
|
||||
}
|
||||
if(empty($params['money'])){
|
||||
return $this->fail('缺少必要参数金额');
|
||||
}
|
||||
$moeny = $params['money'];
|
||||
$result = TaskScheduling::where(['id'=>$params['id']])->update(['money'=>$moeny]);
|
||||
if ( $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
@ -101,20 +89,6 @@ class TaskSchedulingController extends BaseLikeAdminController
|
||||
return $this->fail('编辑失败');
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除任务公司排期
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/08/08 10:08
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new TaskSchedulingValidate())->post()->goCheck('delete');
|
||||
TaskSchedulingLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取任务公司排期详情
|
||||
* @return \think\response\Json
|
||||
@ -123,7 +97,7 @@ class TaskSchedulingController extends BaseLikeAdminController
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new TaskSchedulingValidate())->goCheck('detail');
|
||||
$params = (new TaskSchedulingValidate())->post()->goCheck('detail');
|
||||
$result = TaskSchedulingLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user