master
cody 3 months ago
parent 1c3be927bd
commit 7a03dd90e5

@ -42,10 +42,6 @@ class UpdateCompany extends Command
*/ */
public function handle() public function handle()
{ {
// $YuanheRepository = new YuanheRepository();
// $result = $YuanheRepository->companyInfo(['keyword' => '苏州元瞰科技有限公司','enterpriseName'=>'博世工程技术']);
// dd($result);
$user_id = $this->option('user_id'); $user_id = $this->option('user_id');
// 更新公司信息 // 更新公司信息
$this->compnay($user_id); $this->compnay($user_id);

@ -91,47 +91,9 @@ class OtherController extends CommonController
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]); return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
} }
$YuanheRepository = new YuanheRepository(); $YuanheRepository = new YuanheRepository();
// $result = $YuanheRepository->companyInfo(['enterpriseName' => $all['company_name']]); // $result = $YuanheRepository->search(['keyword' => $all['company_name']]);
$result[] = [ $result = "[{\"createBy\":null,\"createDt\":null,\"updateBy\":null,\"updateDt\":null,\"creditCode\":\"91320594MA7F0G9W6A\",\"keyNo\":\"db5ppy5kbsprbbhjbjlarvmvphjhp3mrkv\",\"name\":\"苏州元瞰科技有限公司\",\"operName\":\"刘杰杰\",\"startDate\":\"2021-12-21\",\"status\":\"注销\"},{\"createBy\":null,\"createDt\":null,\"updateBy\":null,\"updateDt\":null,\"creditCode\":\"91310118MA1JMYNK9K\",\"keyNo\":\"ak95iy5s3rhmsasj5kepiijjimh95jl3b5\",\"name\":\"上海元橡瞰行科技有限公司\",\"operName\":\"任杰\",\"startDate\":\"2019-03-19\",\"status\":\"存续\"},{\"createBy\":null,\"createDt\":null,\"updateBy\":null,\"updateDt\":null,\"creditCode\":\"91110108MAERYU4T74\",\"keyNo\":\"fs3ijyphhk59kbhjblbsj35priklbla5vh\",\"name\":\"北京元字瞰科技有限公司\",\"operName\":\"宋明龙\",\"startDate\":\"2025-08-22\",\"status\":\"存续\"},{\"createBy\":null,\"createDt\":null,\"updateBy\":null,\"updateDt\":null,\"creditCode\":\"\",\"keyNo\":\"13ivbylse5l5mjkjar9pbhkm9vpsjiksjl\",\"name\":\"上海瞰元信息科技有限公司\",\"operName\":\"刘勇\",\"startDate\":\"2005-06-30\",\"status\":\"吊销\"},{\"createBy\":null,\"createDt\":null,\"updateBy\":null,\"updateDt\":null,\"creditCode\":\"91330100796660273A\",\"keyNo\":\"f3aaeyiss99ev5hjbipkv9eaerkih99bbs\",\"name\":\"杭州瞰元信息科技有限公司\",\"operName\":\"曾铁农\",\"startDate\":\"2006-12-22\",\"status\":\"吊销\"}]\"";
"createBy" => null, $result = json_decode($result, true);
"createDt" => null,
"updateBy" => null,
"updateDt" => null,
"enterpriseId" => "1950060660573786112",
"enterpriseName" => "苏州元瞰科技有限公司",
"creditCode" => "91320594MA7F0G9W6A",
"keyNo" => "db5ppy5kbsprbbhjbjlarvmvphjhp3mrkv",
"isAbroad" => "0",
"status" => "注销",
"logo" => "https://image.qcc.com/logo/EntImage.png",
"operName" => "刘杰杰",
"contactMail" => "425039148@qq.com",
"contactPhone" => "15298866552",
"startDate" => "2021-12-21",
"endDate" => null,
"updatedDate" => "2025-08-17",
"registCapi" => "100万元",
"registAmount" => "1000000.0000",
"registCapiType" => "1",
"currencyType" => null,
"termStart" => "2021-12-21",
"termEnd" => null,
"checkDate" => "2025-07-03",
"orgNo" => "MA7F0G9W-6",
"isOnStock" => "0",
"stockNumber" => "",
"stockType" => "",
"stockDate" => null,
"province" => "江苏省",
"city" => "苏州市",
"country" => "苏州工业园区",
"areaCode" => "320576",
"address" => "苏州工业园区亭新街11号B1栋二楼",
"businessScope" => "一般项目:人工智能应用软件开发",
"tagList" => null,
"qccIndustry" => null,
"isYhInvested" => false
];
if (!$result) { if (!$result) {
return $this->fail([ResponseCode::ERROR_PARAMETER, '获取失败']); return $this->fail([ResponseCode::ERROR_PARAMETER, '获取失败']);
} }
@ -180,10 +142,10 @@ class OtherController extends CommonController
// 使用 Haversine 公式计算距离 // 使用 Haversine 公式计算距离
$distanceFormula = " $distanceFormula = "
(6371 * acos( (6371 * acos(
cos(radians(?)) * cos(radians(?)) *
cos(radians(CAST(company_latitude AS DECIMAL(10,8)))) * cos(radians(CAST(company_latitude AS DECIMAL(10,8)))) *
cos(radians(CAST(company_longitude AS DECIMAL(10,8))) - radians(?)) + cos(radians(CAST(company_longitude AS DECIMAL(10,8))) - radians(?)) +
sin(radians(?)) * sin(radians(?)) *
sin(radians(CAST(company_latitude AS DECIMAL(10,8)))) sin(radians(CAST(company_latitude AS DECIMAL(10,8))))
)) AS distance )) AS distance
"; ";

@ -61,6 +61,26 @@ class YuanheRepository
} }
} }
/**
* 公司模糊查询
*/
public function search($params)
{
$url = $this->baseUrl . '/master-service/openapi/businessCollege/enterprise/search';
$header = $this->getHeader();
try {
$result = httpCurl($url, 'GET', $params, $header);
$result = json_decode($result, true);
if ($result['code'] == 200) {
return $result['data'];
} else {
return false;
}
} catch (\Exception $e) {
return false;
}
}
/** /**
* 数据推送 * 数据推送
*/ */

Loading…
Cancel
Save