瀏覽代碼

处理队列commodities
添加fix

Zhouzhendong 5 年之前
父節點
當前提交
ae025d05ff
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 3 3
      app/Services/StationTaskCommodityService.php
  2. 1 1
      app/Services/StationTaskMaterialBoxService.php

+ 3 - 3
app/Services/StationTaskCommodityService.php

@@ -144,7 +144,7 @@ class StationTaskCommodityService
                 $taskBatchId=$groupByBatch[0]['station_task_batch_id'];
                 $processing=$this->getProcessing_byTaskBatch($taskBatchId);
                 if(!$processing
-                    || $processing['station_task_batch_id']==$taskBatchId ){
+                    || $processing['material_box_id'] == $taskBatchId['material_box_id']){
                     $status='处理中';
                 }else{
                     $status='处理队列';
@@ -160,10 +160,10 @@ class StationTaskCommodityService
             $toProcess=$toArray->where('status','处理中');
             $ids_toQueue_toUpdate = data_get($toQueue, '*.id');
             if(count($ids_toQueue_toUpdate))
-                StationTaskCommodity::query()->where('id',$ids_toQueue_toUpdate)->update(['status'=>'处理队列']);
+                StationTaskCommodity::query()->whereIn('id',$ids_toQueue_toUpdate)->update(['status'=>'处理队列']);
             $ids_toProcess_toUpdate = data_get($toProcess, '*.id');
             if(count($ids_toProcess_toUpdate))
-                StationTaskCommodity::query()->where('id',$ids_toProcess_toUpdate)->update(['status'=>'处理中']);
+                StationTaskCommodity::query()->whereIn('id',$ids_toProcess_toUpdate)->update(['status'=>'处理中']);
         })();
 
     }

+ 1 - 1
app/Services/StationTaskMaterialBoxService.php

@@ -182,7 +182,7 @@ class StationTaskMaterialBoxService
             $toArray=$toArray->where('status','处理队列');
             $ids_toUpdate = data_get($toArray, '*.id');
             if(count($ids_toUpdate))
-                StationTaskMaterialBox::query()->where('id',$ids_toUpdate)->update(['status'=>'处理队列']);
+                StationTaskMaterialBox::query()->whereIn('id',$ids_toUpdate)->update(['status'=>'处理队列']);
         })();
 //        StationTaskMaterialBox::query()
 //            ->whereIn('id', data_get($stationTaskMaterialBoxes, '*.id'))