| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- namespace App\Services;
- use App\MaterialBox;
- use App\StationTaskMaterialBox;
- use Illuminate\Http\Request;
- class ForeignHaiRoboticsService
- {
- private function makeJson_move(
- $modeName,
- $fromLocation,
- $toLocation,
- $materialBoxes,
- $groupId=''
- ,$priority=10
- , $isSequenced=1
- ){
- $timestampSuffix = microtime(true);
- $taskMode=(function()use($modeName){
- switch ($modeName){
- case '输送线入库': return 1;
- case '库出至输送线': return 2;
- case '移动位置': return 3;
- case '缓存架入库': return 6;
- default: throw new \Exception('发至海柔的移料箱请求,模式不存在');
- }
- })();
- $bins=$materialBoxes->map(function (MaterialBox $materialBox){
- return [
- ];
- });
- $groupId .= $timestampSuffix;
- $groupId .= $timestampSuffix;
- $json=[
- "taskCode" =>$taskMode,
- "bins"=>$bins,
- "groupCode"=>$groupId,
- "priority"=>$priority,
- "sequenceFlag"=>$isSequenced,
- ];
- }
- public function fetchGroupToLocation($toLocation,StationTaskMaterialBox $taskMaterialBoxes, $groupIdPrefix=''){
- }
- public function moveBin(){
- }
- public function markBinProcessed(){
- }
- public function taskUpdate(){
- }
- public function throwException(){
- }
- }
|