更新排期
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\task_scheduling\TaskScheduling;
|
||||||
use app\common\model\Company;
|
use app\common\model\Company;
|
||||||
|
use app\adminapi\validate\task_scheduling\TaskSchedulingValidate;
|
||||||
|
use app\common\logic\task_scheduling\TaskSchedulingLogic;
|
||||||
use app\common\controller\BaseLikeAdminController;
|
use app\common\controller\BaseLikeAdminController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -14,7 +16,6 @@ use app\common\controller\BaseLikeAdminController;
|
|||||||
class TaskSchedulingController extends BaseLikeAdminController
|
class TaskSchedulingController extends BaseLikeAdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 获取任务公司排期列表
|
* @notes 获取任务公司排期列表
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
@ -54,26 +55,6 @@ class TaskSchedulingController extends BaseLikeAdminController
|
|||||||
return $this->success('请求成功',$result);
|
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 编辑任务公司排期
|
* @notes 编辑任务公司排期
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
@ -89,10 +70,17 @@ class TaskSchedulingController extends BaseLikeAdminController
|
|||||||
}
|
}
|
||||||
return $this->fail(TaskSchedulingLogic::getError());
|
return $this->fail(TaskSchedulingLogic::getError());
|
||||||
}
|
}
|
||||||
|
|
||||||
//编辑金额
|
//编辑金额
|
||||||
public function editMoney()
|
public function editMoney()
|
||||||
{
|
{
|
||||||
$params = $this->request->param();
|
$params = $this->request->param();
|
||||||
|
if(empty($params['id'])){
|
||||||
|
return $this->fail('缺少必要参数id');
|
||||||
|
}
|
||||||
|
if(empty($params['money'])){
|
||||||
|
return $this->fail('缺少必要参数金额');
|
||||||
|
}
|
||||||
$moeny = $params['money'];
|
$moeny = $params['money'];
|
||||||
$result = TaskScheduling::where(['id'=>$params['id']])->update(['money'=>$moeny]);
|
$result = TaskScheduling::where(['id'=>$params['id']])->update(['money'=>$moeny]);
|
||||||
if ( $result) {
|
if ( $result) {
|
||||||
@ -101,20 +89,6 @@ class TaskSchedulingController extends BaseLikeAdminController
|
|||||||
return $this->fail('编辑失败');
|
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 获取任务公司排期详情
|
* @notes 获取任务公司排期详情
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
@ -123,7 +97,7 @@ class TaskSchedulingController extends BaseLikeAdminController
|
|||||||
*/
|
*/
|
||||||
public function detail()
|
public function detail()
|
||||||
{
|
{
|
||||||
$params = (new TaskSchedulingValidate())->goCheck('detail');
|
$params = (new TaskSchedulingValidate())->post()->goCheck('detail');
|
||||||
$result = TaskSchedulingLogic::detail($params);
|
$result = TaskSchedulingLogic::detail($params);
|
||||||
return $this->data($result);
|
return $this->data($result);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user