Commit d546f297 by mushishixian

修复盘

parent 39b20a28
......@@ -237,7 +237,8 @@ class SupplierFilter
break;
case "has_supplier_tag":
$query->where(function ($q) {
$q->where('system_tags', '!=', '')->orWhere('customer_tags', '!=', '');
$q->whereRaw("system_tags REGEXP '客户指定供应商'");
// $q->where('system_tags', '!=', '')->orWhere('customer_tags', '!=', '');
});
break;
//附件里面缺少品质协议的
......@@ -245,17 +246,16 @@ class SupplierFilter
$query->leftjoin('supplier_attachment', 'supplier_channel.supplier_id', '=',
'supplier_attachment.supplier_id')
->selectRaw('lie_supplier_channel.*,
lie_supplier_attachment.quality_assurance_agreement,lie_supplier_attachment.supplier_id')
lie_supplier_attachment.quality_assurance_agreement,lie_supplier_attachment.supplier_id as supplier_attachment_supplier_id')
->where(function ($q) {
$q->where('supplier_attachment.quality_assurance_agreement', '')
->orWhereNull('supplier_attachment.supplier_id');
});
$query->whereNotIn('status',
[SupplierChannelModel::STATUS_DISABLE, SupplierChannelModel::STATUS_BLOCK]);
//而且还是贸易商类型的供应商
$query->where('supplier_group', 2);
break;
// case "no_quality_assurance_agreement":
// $query->whereHas('attachment', function ($q) {
// $q->where('quality_assurance_agreement1', '')->orWhereNull('supplier_id');
// });
// break;
//联系人待完善
case "contact_no_complete":
$query->whereHas('contact', function ($q) {
......
......@@ -118,6 +118,10 @@ class DataService
4 => '标签4',
];
$tagList = [
5 => '客户指定供应商',
];
$client = new Client([
'base_uri' => config('website.TagUrl'),
]);
......
......@@ -48,7 +48,7 @@ class SupplierStatisticsService
//没有品牌协议附件的
$noQualityAssuranceAgreement = $this->getStatisticsCount('no_quality_assurance_agreement');
//有标签的(客户指定供应商)
$hasTagSupplier = 0;
$hasTagSupplier = $this->getStatisticsCount('has_supplier_tag');
//联系人未完善
$concatNoComplete = $this->getStatisticsCount('contact_no_complete');
......
......@@ -44,6 +44,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () {
});
Route::match(['get', 'post'], '/test', function () {
$service = new \App\Http\Services\DataService();
$service->initSystemTag();
$service->changeSupplierIsTypeByCheckChannelUidOrPurchaseUid();
// $service->initSystemTag();
// $service->transferFileData();
......
......@@ -94,7 +94,7 @@
</div>
@endif
<div class="layui-row">
<a class="main_filter" id="no_quality_assurance_agreement">
<a title="公司性质为贸易商性质的供应商没有上传品质协议" class="main_filter" id="no_quality_assurance_agreement">
</a>
</div>
</div>
......
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