更新
This commit is contained in:
parent
b04fd36147
commit
e02627e558
@ -26,7 +26,7 @@ class Task extends CommonModel
|
||||
if (!$code) {
|
||||
throw new Exception('请选择任务', 1);
|
||||
}
|
||||
$task = self::where(['code' => $code])->field('id', true)->find();
|
||||
$task = self::where(['code' => $code])->field('id', true)->find()->toArray();
|
||||
if (!$task) {
|
||||
throw new Exception('该任务已失效', 404);
|
||||
}
|
||||
@ -36,6 +36,16 @@ class Task extends CommonModel
|
||||
if ($task['assign_to']) {
|
||||
$task['executor'] = Member::where(['code' => $task['assign_to']])->field('name,code,avatar')->find();
|
||||
}
|
||||
$exchange_list=explode(',',$task['exchange_list']);
|
||||
$copied_list=explode(',',$task['copied_list']);
|
||||
$task['exchange_info']=null;
|
||||
$task['copied_info']=null;
|
||||
foreach($exchange_list as $k=>$v){
|
||||
$task['exchange_info'][]=Member::where(['code'=>$v])->field('name,code,avatar')->find();
|
||||
}
|
||||
foreach($copied_list as $k=>$v){
|
||||
$task['copied_info'][]=Member::where(['code'=>$v])->field('name,code,avatar')->find();
|
||||
}
|
||||
if ($task['pcode']) {
|
||||
$task['parentTask'] = self::where(['code' => $task['pcode']])->field('id', true)->find();
|
||||
$parents = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user