fix
This commit is contained in:
parent
6234922e05
commit
d8c8f016b3
@ -82,7 +82,8 @@ class TaskController extends BaseApiController
|
||||
$res[$k]['extend']['transaction'] = '';
|
||||
}
|
||||
}
|
||||
if ($townTaskTypeList[$item['type']] == 'town_task_type_1') {
|
||||
if (isset($townTaskTypeList[$item['type']])) {
|
||||
if ($townTaskTypeList[$item['type']] == 'town_task_type_1') {
|
||||
// 协助总负责人开展工作任务
|
||||
$groupServiceCompanyCount = 0; // 已安排任务的小组服务公司总数
|
||||
$notDoneTaskGroupServiceCompanyCount = 0; // 未完成每日任务的小组服务公司总数
|
||||
@ -105,15 +106,17 @@ class TaskController extends BaseApiController
|
||||
}
|
||||
}
|
||||
$res[$k]['extend'] = ['total' => $groupServiceCompanyCount, 'not_done_count' => $notDoneTaskGroupServiceCompanyCount];
|
||||
}
|
||||
if ($townTaskTypeList[$item['type']] == 'town_task_type_2') {
|
||||
// 拓展小组服务团队工作任务
|
||||
$contractCount = 15; // 小组服务合同总数
|
||||
$doneContractCount = 0; // 已完成小组服务合同数
|
||||
$townCompany = Company::where(['id' => $item['company_id']])->find();
|
||||
$doneContractCount = Contract::where(['party_a' => $townCompany['id'], 'status' => 1, 'contract_type' => 25])->count();
|
||||
$res[$k]['extend'] = ['total' => $contractCount, 'done_count' => $doneContractCount];
|
||||
}
|
||||
}
|
||||
if ($townTaskTypeList[$item['type']] == 'town_task_type_2') {
|
||||
// 拓展小组服务团队工作任务
|
||||
$contractCount = 15; // 小组服务合同总数
|
||||
$doneContractCount = 0; // 已完成小组服务合同数
|
||||
$townCompany = Company::where(['id' => $item['company_id']])->find();
|
||||
$doneContractCount = Contract::where(['party_a' => $townCompany['id'], 'status' => 1, 'contract_type' => 25])->count();
|
||||
$res[$k]['extend'] = ['total' => $contractCount, 'done_count' => $doneContractCount];
|
||||
}
|
||||
|
||||
// break;
|
||||
// case 'town_task_type_2':
|
||||
// // 拓展小组服务团队工作任务
|
||||
|
Loading…
x
Reference in New Issue
Block a user