Commit a42a47e2 by 杨树贤

是否实体

parent 00197ede
......@@ -340,7 +340,7 @@ class SupplierApiController extends Controller
//还要校验提交上来的公司是否有合法信息
$unitedInfo = $unitedCompanyInfo['united_company_info'];
if ($unitedInfo) {
if ($unitedInfo['is_entity'] == 1) {
if (isset($unitedCompanyInfo['is_entity']) && $unitedCompanyInfo['is_entity'] == 1) {
$this->response(-3, '该供应商已经被一体化系统加入黑名单,不能新增');
}
if ($unitedInfo['company_category'] != '') {
......
......@@ -27,8 +27,9 @@ class CompanyService
$unitedCompanyInfo = [];
if (array_get($result, 'code') === 0) {
$unitedCompanyInfo['united_company_info'] = !empty($result['data']['companyInfo']) ? $result['data']['companyInfo'] : [];
$company = [];
$unitedCompanyInfo['is_entity'] = isset($result['data']['is_entity']) ? $result['data']['is_entity'] : 0;
$companyInfoList = array_get(array_get($result['data'], 'tycList'), 'company_info_list');
$company = [];
if (!empty($companyInfoList)) {
$companyInfo = $companyInfoList[0];
$companyInfo['establishment_time'] = $companyInfo['establishment_time'] ? $companyInfo['establishment_time'] / 1000 : 0;
......
......@@ -40,7 +40,7 @@ class SupplierValidator
$regionType);
$unitedInfo = $unitedCompanyInfo['united_company_info'];
if ($unitedInfo && $isAdd) {
if ($unitedInfo['is_entity'] == 1) {
if (isset($unitedCompanyInfo['is_entity']) && $unitedCompanyInfo['is_entity'] == 1) {
return '该供应商已经被一体化系统加入黑名单,不能新增';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment