更新
This commit is contained in:
parent
18a8100f3c
commit
3c6e6a6e2c
@ -295,6 +295,8 @@ class Task extends CommonModel
|
||||
$parentTask['path'] && $parentTask['path'] = ",{$parentTask['path']}";
|
||||
$path = "{$parentTask['code']}{$parentTask['path']}";
|
||||
}
|
||||
$code= TaskStages::where('project_code',$projectCode)->where('name','进行中')->where('deleted',0)->value('code');
|
||||
|
||||
$data = [
|
||||
'create_time' => nowTime(),
|
||||
'code' => createUniqueCode('task'),
|
||||
@ -305,7 +307,7 @@ class Task extends CommonModel
|
||||
'project_code' => $projectCode,
|
||||
'pcode' => $parentCode,
|
||||
'path' => $path,
|
||||
'stage_code' => $stageCode,
|
||||
'stage_code' => $code,
|
||||
'pri' => $pri,
|
||||
'description' => $description,
|
||||
'begin_time' => $beginTime,
|
||||
@ -483,14 +485,18 @@ class Task extends CommonModel
|
||||
$comments='comment';
|
||||
if($type==1){
|
||||
$data['status']=2;
|
||||
$code= TaskStages::where('project_code',$task['project_code'])->where('name','已完成')->where('deleted',0)->value('code');
|
||||
if($task['exchange_list']){
|
||||
$code= TaskStages::where('project_code',$task['project_code'])->where('name','已完成')->where('deleted',0)->value('code');
|
||||
|
||||
$task['transferred'][]=$task['exchange_list'][0];
|
||||
$task['assign_to']=$task['exchange_list'][0];
|
||||
unset($task['exchange_list'][0]);
|
||||
$res= self::where('id',$task['id'])->update($data);
|
||||
}else{
|
||||
$code= TaskStages::where('project_code',$task['project_code'])->where('name','已完成')->where('deleted',0)->value('code');
|
||||
$data['status']=1;
|
||||
$data['done']=1;
|
||||
$data['execute_status']='done';
|
||||
$data['stage_code']=$code;
|
||||
|
||||
$res= self::name('task')->where('id',$task['id'])->update($data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user