diff --git a/app/common/logic/task/TaskLogic.php b/app/common/logic/task/TaskLogic.php index fe626ecde..130ca195c 100644 --- a/app/common/logic/task/TaskLogic.php +++ b/app/common/logic/task/TaskLogic.php @@ -1176,18 +1176,18 @@ class TaskLogic extends BaseLogic // 负责人任务类型id列表 $typeIds = []; $townMasterTaskTypeList = DictData::where(['type_value' => 'town_task_type_master', 'status' => 1])->column('value', 'id'); - foreach ($townMasterTaskTypeList as $item) { - if ($item['value'] == 'town_task_type_master_3') { - $typeIds[] = $item['id']; + foreach ($townMasterTaskTypeList as $k => $item) { + if ($item == 'town_task_type_master_3') { + $typeIds[] = $k; } - if ($item['value'] == 'town_task_type_master_4') { - $typeIds[] = $item['id']; + if ($item == 'town_task_type_master_4') { + $typeIds[] =$k; } - if ($item['value'] == 'town_task_type_master_5') { - $typeIds[] = $item['id']; + if ($item == 'town_task_type_master_5') { + $typeIds[] = $k; } - if ($item['value'] == 'town_task_type_master_8') { - $typeIds[] = $item['id']; + if ($item == 'town_task_type_master_8') { + $typeIds[] = $k; } } @@ -1205,7 +1205,6 @@ class TaskLogic extends BaseLogic } } } - // 下属小组服务公司有任务安排,也完成了任务 if ($isDone === 1 && $isTaskSchedule === 1) { // 做任务结算,分润 @@ -2255,18 +2254,18 @@ class TaskLogic extends BaseLogic // 负责人任务类型id列表 $typeIds = []; $townMasterTaskTypeList = DictData::where(['type_value' => 'town_task_type_master', 'status' => 1])->column('value', 'id'); - foreach ($townMasterTaskTypeList as $item) { - if ($item['value'] == 'town_task_type_master_3') { - $typeIds[] = $item['id']; + foreach ($townMasterTaskTypeList as $k=>$item) { + if ($item == 'town_task_type_master_3') { + $typeIds[] = $k; } - if ($item['value'] == 'town_task_type_master_4') { - $typeIds[] = $item['id']; + if ($item == 'town_task_type_master_4') { + $typeIds[] = $k; } - if ($item['value'] == 'town_task_type_master_5') { - $typeIds[] = $item['id']; + if ($item == 'town_task_type_master_5') { + $typeIds[] = $k; } - if ($item['value'] == 'town_task_type_master_8') { - $typeIds[] = $item['id']; + if ($item == 'town_task_type_master_8') { + $typeIds[] = $k; } } // 查询 镇农科公司负责人是否有对应的每日任务安排