Commit 1859d837 by mushishixian

审核隐藏

parent 9b0355fd
......@@ -85,9 +85,9 @@ class DataService
$suppliers = $model->where(function ($q) {
$q->where('channel_uid', '!=', '')->orWhere('purchase_uid', '!=', '');
})->where('is_type', 1)->get()->toArray();
if (count($suppliers) > 1709) {
dd("数量有问题");
}
// if (count($suppliers) > 1709) {
// dd("数量有问题");
// }
$redis = new RedisModel();
//非正式供应商中存在渠道员/采购员,将供应商改为正式供应商
foreach ($suppliers as $supplier) {
......@@ -102,7 +102,7 @@ class DataService
$model->where('supplier_id', $supplier['supplier_id'])
->update([
'update_time' => time(),
'is_type' => 1,
'is_type' => 0,
'status' => 1
]);
}
......
......@@ -109,7 +109,8 @@ class SupplierShareApplyService
$q->where('department_id', $departmentId)->where('audit_uid', 0);
})->orWhere(function ($q) use ($departmentId) {
//当要判断申请者申请的部门的时候,要复审人为空,因为复审这一步是被申请部门的人审核的
$q->where('apply_department_id', $departmentId)->where('review_uid', 0)->where('audit_uid', '!=', 0);
$q->where('apply_department_id', $departmentId)->where('review_uid', 0)->where('audit_uid', '!=', 0)
->where('status', SupplierShareApplyModel::STATUS_NEED_REVIEW);
})->orderBy('id', 'desc');
$limit = request()->get('limit', 20);
$list = $query->paginate($limit)->toArray();
......
......@@ -44,6 +44,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () {
});
Route::match(['get', 'post'], '/test', function () {
$service = new \App\Http\Services\DataService();
$service->changeSupplierIsTypeByCheckChannelUidOrPurchaseUid();
// $service->initSystemTag();
// $service->transferFileData();
});
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