入股审核
This commit is contained in:
parent
50ee9c7282
commit
a9cd078339
@ -227,7 +227,7 @@ class ApproveController extends BaseAdminController
|
||||
// 村公司
|
||||
$subordinateCompany = Company::where(['id'=>$approve->department_id])->find();
|
||||
// 镇农科公司 负责区域包含有村公司的street码
|
||||
$parentCompany = Db::query("select id from la_company where company_type=:company_type and FIND_IN_SET(:street,responsible_area)", ['company_type' => 41,'street'=>$subordinateCompany['street']], true)[0];
|
||||
$parentCompany = Db::query("select * from la_company where company_type=:company_type and FIND_IN_SET(:street,responsible_area)", ['company_type' => 41,'street'=>$subordinateCompany['street']], true)[0];
|
||||
}
|
||||
|
||||
$amount = $approve->amount; // 上交股金金额
|
||||
|
@ -99,11 +99,20 @@ class ApproveLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
})
|
||||
->withAttr('company_b_name',function($value,$data){
|
||||
$task = Task::where('id', $data['task_id'])->find();
|
||||
if ($data['type'] == Approve::APPROVE_TYPE_11) {
|
||||
return '下属小组服务公司';
|
||||
}
|
||||
if ($data['type'] == Approve::APPROVE_TYPE_14) {
|
||||
return '下属村管理公司';
|
||||
}
|
||||
return Company::where(['id' => $task['company_id']])->value('company_name');
|
||||
})
|
||||
->withAttr('company_a_name',function($value,$data){
|
||||
$task = Task::where('id', $data['task_id'])->find();
|
||||
$companyB = Company::where(['id' => $task['company_id']])->find();
|
||||
if ($data['type'] == Approve::APPROVE_TYPE_12 || $data['type'] == Approve::APPROVE_TYPE_14) {
|
||||
return Db::query("select * from la_company where company_type=:company_type and FIND_IN_SET(:street,responsible_area)", ['company_type' => 41,'street'=>$companyB['street']], true)[0]['company_name'];
|
||||
}
|
||||
return Company::where(['village' => $companyB['village'], 'company_type'=>17])->value('company_name');
|
||||
})
|
||||
->toArray();
|
||||
|
@ -73,6 +73,7 @@ class TaskController extends BaseApiController
|
||||
$villageTaskTypeList = DictData::where(['type_value' => 'village_task_type', 'status' => 1])->column('value', 'id');
|
||||
$townTaskTypeList = DictData::where(['type_value' => 'town_task_type', 'status' => 1])->column('value', 'id');
|
||||
$townMarketingManagerTaskTypeList = DictData::where(['type_value' => 'town_task_type_marketing_director', 'status' => 1])->column('value', 'id');
|
||||
$townMasterTaskTypeList = DictData::where(['type_value' => 'town_task_type_master', 'status' => 1])->column('value', 'id');
|
||||
|
||||
$res = Task::where($where)
|
||||
->field(['id', 'title', 'money', 'template_id', 'director_uid', 'company_id', 'start_time', 'end_time', 'director_uid', 'type', 'status', 'content', 'extend'])
|
||||
@ -80,6 +81,7 @@ class TaskController extends BaseApiController
|
||||
->order(['id' => 'desc', 'status' => 'asc'])
|
||||
->select()->toArray();
|
||||
foreach ($res as $k => $item) {
|
||||
$res[$k]['task_type_value'] = '';
|
||||
if (isset($serviceGroupTaskTypeList[$item['type']])) {
|
||||
$res[$k]['task_type_value'] = $serviceGroupTaskTypeList[$item['type']];
|
||||
}
|
||||
@ -89,8 +91,8 @@ class TaskController extends BaseApiController
|
||||
if (isset($townTaskTypeList[$item['type']])) {
|
||||
$res[$k]['task_type_value'] = $townTaskTypeList[$item['type']];
|
||||
}
|
||||
if (isset($townMarketingManagerTaskTypeList[$item['type']])) {
|
||||
$res[$k]['task_type_value'] = $townMarketingManagerTaskTypeList[$item['type']];
|
||||
if (isset($townMasterTaskTypeList[$item['type']])) {
|
||||
$res[$k]['task_type_value'] = $townMasterTaskTypeList[$item['type']];
|
||||
}
|
||||
|
||||
if ($item['type'] == 33) {
|
||||
|
@ -730,14 +730,6 @@ class TaskLogic extends BaseLogic
|
||||
Log::info(['镇农科公司定时任务结算执行-'.$taskSchedulePlan['template_info']['title']]);
|
||||
$taskTemplateInfo = $taskSchedulePlan['template_info'];
|
||||
$dayCount = $taskTemplateInfo['day_count'];
|
||||
$taskInfo = Task::where(['id' => $taskSchedulePlan['task_id']])->find();
|
||||
$townCompany = Company::where(['id' => $taskTemplateInfo['company_id']])->find();
|
||||
// 行政村数量
|
||||
$villageCount = Db::name('geo_village')->where(['street_code' => $townCompany['street']])->count();
|
||||
// 小组服务公司总数
|
||||
$groupServiceCompanyList = Company::where(['company_type'=> 18])->whereIn('street', $townCompany['responsible_area'])->select()->toArray();
|
||||
$groupServiceCompanyCount = count($groupServiceCompanyList);
|
||||
|
||||
// 任务累计天数 <= 任务天数 刷新任务
|
||||
if ($dayCount <= $taskTemplateInfo['stage_day_one']) {
|
||||
self::flushTaskTime($taskSchedulePlan);
|
||||
|
Loading…
x
Reference in New Issue
Block a user