|
|
@@ -130,45 +130,15 @@ sql;
|
|
|
|
|
|
public function test()
|
|
|
{
|
|
|
- Cache::forget("CACHE_SHELF_AVAILABLE");
|
|
|
- $station = ["HAIB1-01-01"];
|
|
|
- $material = ["IDE0000751"];
|
|
|
- Station::query()->whereIn("code",$station)->update(["status"=>0]);
|
|
|
- $stations = Station::query()->whereIn("code",$station)->get();
|
|
|
- $materials = MaterialBox::query()->whereIn("code",$material)->get();
|
|
|
- $dateTime = date("Y-m-d H:i:s");
|
|
|
- $task1 = StationTaskMaterialBox::query()->create([
|
|
|
- 'station_id'=>$stations[0]->id,
|
|
|
- 'material_box_id'=>$materials[0]->id,
|
|
|
- 'station_task_batch_id'=>1,
|
|
|
- 'status'=>'待处理'
|
|
|
- ]);
|
|
|
- TaskTransaction::query()->insert([[
|
|
|
- "doc_code" => "test",
|
|
|
- "bar_code" => "test",
|
|
|
- "to_station_id" => $stations[0]->id,
|
|
|
- "material_box_id" => $materials[0]->id,
|
|
|
- "task_id" => $task1->id,
|
|
|
- "commodity_id" => 505012,//XUNI03
|
|
|
- "amount" => 1,
|
|
|
- "type" => "出库",
|
|
|
- "status" => 0,
|
|
|
- "mark" => 2,
|
|
|
- "bin_number"=>1,
|
|
|
- "created_at"=>$dateTime,
|
|
|
- "updated_at"=>$dateTime,
|
|
|
- ]]);
|
|
|
- $foreignHaiRoboticsService = new ForeignHaiRoboticsService();
|
|
|
- $toLocation = collect($station);
|
|
|
- $taskMaterialBoxes = collect([$task1]);
|
|
|
- $foreignHaiRoboticsService->
|
|
|
- fetchGroup_multiLocation($toLocation, $taskMaterialBoxes, '', '立架出至缓存架',20,false);
|
|
|
- foreach ($toLocation as $value){
|
|
|
- app("CacheShelfService")->lightUp($value,'3','0',["title"=>"机器人取箱中,禁止操作"]);
|
|
|
- Cache::forever("CACHE_SHELF_OCCUPANCY_11",true);
|
|
|
- }
|
|
|
- app("StationService")->locationOccupyMulti($toLocation->toArray());
|
|
|
- dd(1);
|
|
|
+ \Illuminate\Support\Facades\Log::emergency("emergency");
|
|
|
+ \Illuminate\Support\Facades\Log::critical("critical");
|
|
|
+ \Illuminate\Support\Facades\Log::alert("alert");
|
|
|
+ \Illuminate\Support\Facades\Log::error("error");
|
|
|
+ \Illuminate\Support\Facades\Log::warning("warning");
|
|
|
+ \Illuminate\Support\Facades\Log::notice("notice");
|
|
|
+ \Illuminate\Support\Facades\Log::info("info");
|
|
|
+ \Illuminate\Support\Facades\Log::debug("debug");
|
|
|
+ $a = 0/0;
|
|
|
/*$batchService = new BatchService();
|
|
|
$batches = Batch::query()->where("id",171829)->get();
|
|
|
$batchService->assignTasks($batches);
|