|
|
@@ -10,6 +10,43 @@ 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(){
|
|
|
|