This commit is contained in:
mkm 2024-01-13 09:20:44 +08:00
parent 1f755a0a1b
commit e6336d9c6e
2 changed files with 4 additions and 2 deletions

View File

@ -36,7 +36,7 @@ class TaskStages extends CommonModel
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function tasks($stageCode, $deleted = 0, $done = -1, $title = '', $pri = [], $executor = [], $creator = [], $joiner = [], $status = [], $endTime = [], $beginTime = [], $createTime = [], $doneTime = [])
public function tasks($stageCode, $deleted = 0, $done = -1, $title = '', $pri = [], $executor = [], $creator = [], $joiner = [], $status = [], $endTime = [], $beginTime = [], $createTime = [], $doneTime = [],$data=[])
{
$where = ['pcode' => '', 'deleted' => $deleted];
if ($done != -1) {

View File

@ -66,6 +66,7 @@ class TaskStages extends BasicApi
{
$where = [];
$code = Request::post('stageCode');
$type = Request::post('type');
$done = Request::param('done', -1);
$title = Request::param('title', '');
$pri = json_decode(Request::post('pri', ''));
@ -82,7 +83,8 @@ class TaskStages extends BasicApi
$this->error("数据解析异常");
}
$where[] = ['stage_code', '=', $code];
$list = $this->model->tasks($code, 0, $done, $title, $pri, $executor, $creator, $joiner, $status, $endTime, $beginTime, $createTime, $doneTime);
$data[] = ['type'=>$type];
$list = $this->model->tasks($code, 0, $done, $title, $pri, $executor, $creator, $joiner, $status, $endTime, $beginTime, $createTime, $doneTime,$data);
// $list = \app\common\Model\Task::alias('t')->join('member m','t.assign_to = m.code')->field()->where(['stage_code'=>$code])->select();
$this->success('', $list);