|
...
|
...
|
@@ -100,6 +100,22 @@ class FetchTicketProjects extends Command |
|
|
|
elseif ($status == 1)
|
|
|
|
$engineer_id = $pm_id; // 建站中找项目经理
|
|
|
|
|
|
|
|
$team_names = [
|
|
|
|
$item['pm'],
|
|
|
|
$item['assm'],
|
|
|
|
$item['yhs'],
|
|
|
|
$item['team_leader'],
|
|
|
|
$item['technology'],
|
|
|
|
$item['designer'],
|
|
|
|
$item['yhszl'],
|
|
|
|
];
|
|
|
|
// 过滤掉空值,去掉重复
|
|
|
|
$team_ids = ManageHr::whereIn('name', $team_names)->pluck('manage_id')
|
|
|
|
->unique()
|
|
|
|
->filter(fn($v) => !is_null($v) && $v !== 0)
|
|
|
|
->values()
|
|
|
|
->toArray();
|
|
|
|
|
|
|
|
$fields = [
|
|
|
|
'post_id' => $item['postid'],
|
|
|
|
'company_name' => $item['company'],
|
|
...
|
...
|
@@ -114,7 +130,8 @@ class FetchTicketProjects extends Command |
|
|
|
'project_cate' => 1,
|
|
|
|
'pm_id' => $pm_id,
|
|
|
|
'status' => $status, // 项目状态
|
|
|
|
'wechat_group_id' => $item['wx_id']
|
|
|
|
'wechat_group_id' => $item['wx_id'],
|
|
|
|
'team' => $team_ids ? json_encode($team_ids) : null,
|
|
|
|
];
|
|
|
|
if (!$project) {
|
|
|
|
$new = new TicketProject();
|
|
...
|
...
|
@@ -212,6 +229,23 @@ class FetchTicketProjects extends Command |
|
|
|
|| $item->site_status == 1
|
|
|
|
) ? 1 : 0;
|
|
|
|
|
|
|
|
$team_ids = [
|
|
|
|
$item->deploy_build->leader_mid,
|
|
|
|
$item->deploy_build->manager_mid,
|
|
|
|
$item->deploy_build->designer_mid,
|
|
|
|
$item->deploy_build->tech_mid,
|
|
|
|
$item->deploy_optimize->manager_mid,
|
|
|
|
$item->deploy_optimize->optimist_mid,
|
|
|
|
$item->deploy_optimize->assist_mid,
|
|
|
|
$item->deploy_optimize->tech_mid,
|
|
|
|
$item->deploy_optimize->tech_leader,
|
|
|
|
];
|
|
|
|
// $team_ids 去重复
|
|
|
|
$team_ids = array_unique($team_ids);
|
|
|
|
$team_ids = array_filter($team_ids);
|
|
|
|
// $team_ids 去掉下标
|
|
|
|
$team_ids = array_values($team_ids);
|
|
|
|
|
|
|
|
$fields = [
|
|
|
|
'company_name' => $item->company,
|
|
|
|
'title' => $item->title . " - V6",
|
|
...
|
...
|
@@ -230,6 +264,7 @@ class FetchTicketProjects extends Command |
|
|
|
->value('friend_id'),
|
|
|
|
'pm_id' => $pm_id,
|
|
|
|
'status' => $status, // 项目状态
|
|
|
|
'team' => $team_ids ? json_encode($team_ids) : null,
|
|
|
|
];
|
|
|
|
if (!$project) {
|
|
|
|
$project = new TicketProject();
|
...
|
...
|
|