Browse Source

[智价云] 公司去重校验补充

tangyuanwang 10 hours ago
parent
commit
4293980029
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Models/Manager/Process/ViolationStore.php

+ 1 - 1
app/Models/Manager/Process/ViolationStore.php

@@ -80,7 +80,7 @@ class ViolationStore extends Model
     public function addViolationStore($data)
     {
         //检查是否重复清洗
-        $source_data_log = $this->where('source_id', $data['source_id'])->count();
+        $source_data_log = $this->where([['company_id','=', $data['company_id']],['source_id','=', $data['source_id']]])->count();
         if (!empty($source_data_log) && $source_data_log > 0) return true;
         $source_where[] = ['company_id', '=', $data['company_id']];
         $source_where[] = ['store_name', '=', $data['store_name']];