|
|
@@ -50,7 +50,8 @@ class ForeignHaiRoboticsService
|
|
|
$groupId=''
|
|
|
, $priority=10
|
|
|
, $isSequenced=1
|
|
|
- ){
|
|
|
+ ): array
|
|
|
+ {
|
|
|
$timestampSuffix = microtime(true);
|
|
|
$taskMode=(function()use($modeName){
|
|
|
switch ($modeName){
|
|
|
@@ -130,10 +131,11 @@ class ForeignHaiRoboticsService
|
|
|
:(function(){throw new ErrorException('呼叫机器人回收U型线料箱失败');})();
|
|
|
$this->stationTaskMaterialBoxService
|
|
|
->markProcessed($stationTaskMaterialBox);
|
|
|
+ return true;
|
|
|
}catch (\Exception $e){
|
|
|
$this->stationTaskMaterialBoxService
|
|
|
->excepted($stationTaskMaterialBox??$materialBox??null);
|
|
|
- return false;
|
|
|
+ return $e->getMessage();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -170,16 +172,22 @@ class ForeignHaiRoboticsService
|
|
|
})()){
|
|
|
throw new ErrorException('发回的料箱和任务号(ID)不匹配');
|
|
|
}
|
|
|
- if(($isPut
|
|
|
- =$updateEventType)==1){
|
|
|
- $this->stationTaskMaterialBoxService->markHasPut($stationTaskMaterialBox);
|
|
|
- }
|
|
|
- if(($isGet
|
|
|
- =$updateEventType)==0){
|
|
|
- $this->stationTaskMaterialBoxService->markTaken($stationTaskMaterialBox);
|
|
|
- }
|
|
|
+ ($标记已放置在库外=
|
|
|
+ function()use($updateEventType,$stationTaskMaterialBox){
|
|
|
+ if(($isPut
|
|
|
+ =$updateEventType)==1){
|
|
|
+ $this->stationTaskMaterialBoxService->markHasPut($stationTaskMaterialBox);
|
|
|
+ }
|
|
|
+ })();
|
|
|
+ ($标记已入立架=
|
|
|
+ function()use($updateEventType,$stationTaskMaterialBox){
|
|
|
+ if(($isGet
|
|
|
+ =$updateEventType)==0){
|
|
|
+ $this->stationTaskMaterialBoxService->markTaken($stationTaskMaterialBox);
|
|
|
+ }
|
|
|
+ })();
|
|
|
}catch (\Exception $e){
|
|
|
- $this->excepted($taskCode, $binCode);
|
|
|
+ $this->excepted($taskCode, $binCode, $e->getMessage());
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
@@ -199,8 +207,14 @@ class ForeignHaiRoboticsService
|
|
|
// }
|
|
|
|
|
|
|
|
|
- public function excepted($taskCode,$binCode):bool{
|
|
|
-
|
|
|
+ public function excepted($taskCode='',$binCode='', $msg=''):bool{
|
|
|
+ try{
|
|
|
+ throw new ErrorException(
|
|
|
+ "taskCode任务号:$taskCode , binCode箱号:$binCode 海柔运行报错: $msg"
|
|
|
+ );
|
|
|
+ }catch (\Exception $e){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|