Commit 56f68c84 by 杨树贤

修复展示

parent d4b9ec8b
......@@ -251,14 +251,12 @@ class SupplierContractService
// 2、类型为人工上传,有合同附件,且上传人是:云芯系统供应商
$query->where('contract_type', 1)
->where('create_name', '云芯系统供应商')
->where('contract_file_url', '!=', '');
->where('oss_file_id', '!=', '');
})->pluck('purchase_id');
$existSupplierIds = PurchaseOrderModel::query()
->whereIn('purchase_id', $purchaseIds)
->distinct()
->pluck('supplier_id')->toArray();
$result = [];
foreach ($supplierIds as $supplierId) {
$result[$supplierId] = in_array($supplierId, $existSupplierIds) ? 1 : -1;
......
......@@ -51,7 +51,6 @@ class SupplierTransformer
}, $value);
}
$hasOrderContractMap = SupplierContractService::hasOrderContractMap($supplierIds);
foreach ($list as &$supplier) {
$supplier['has_order_contract'] = array_get($hasOrderContractMap, $supplier['supplier_id'], -1);
$supplier['viewed'] = array_get($viewData, $supplier['supplier_id'], false);
......
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