@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
import lombok.Data ;
import lombok.RequiredArgsConstructor ;
import lombok.extern.slf4j.Slf4j ;
import org.apache.commons.lang3.StringUtils ;
import org.nl.acs.AcsConfig ;
import org.nl.acs.agv.server.NDCAgvService ;
import org.nl.acs.auto.run.TwoNDCSocketConnectionAutoRun ;
@@ -27,6 +28,8 @@ import org.nl.acs.device_driver.two_conveyor.ranging_stations.RangingStationsDev
import org.nl.acs.device_driver.two_conveyor.waste_foil_weighing_station.WasteFoilWeighingStationDriver ;
import org.nl.acs.ext.wms.service.AcsToWmsService ;
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl ;
import org.nl.acs.agv.domain.TwoFloorAgvStatus ;
import org.nl.acs.agv.service.impl.TwoFloorAgvStatusService ;
import org.nl.acs.history.ErrorUtil ;
import org.nl.acs.history.service.DeviceErrorLogService ;
import org.nl.acs.history.service.dto.DeviceErrorLogDto ;
@@ -76,6 +79,11 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
TwoAgvPhase twoAgvPhase = new TwoAgvPhase ( ) ;
ISysDictService dictService = SpringContextHolder . getBean ( ISysDictService . class ) ;
/**
* 二楼AGV状态管理服务
*/
private TwoFloorAgvStatusService agvStatusService = SpringContextHolder . getBean ( TwoFloorAgvStatusService . class ) ;
String error_code = " 0 " ;
int agvaddr = 0 ;
int agvaddr_copy = 0 ;
@@ -100,6 +108,148 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
Boolean iserror = false ;
boolean isCharge = false ;
/**
* 更新AGV状态信息到TwoFloorAgvStatusService
* @param arr socket数据数组
* @param carno 车号
* @param phase 当前阶段
* @param ikey 任务号
* @param agvaddr 站点号
* @param inst 指令信息
* @param task 任务信息
*/
public TwoFloorAgvStatus updateAgvStatusToService ( int [ ] arr , int carno , int phase , int ikey , int agvaddr , Instruction inst , TaskDto task ) {
if ( carno = = 0 ) {
return null ;
}
try {
// 创建AGV状态对象
TwoFloorAgvStatus agvStatus = new TwoFloorAgvStatus ( ) ;
// 设置AGV车辆代码
String vehicleCode = String . format ( " AGV%02d " , carno ) ;
agvStatus . setVehicle_code ( vehicleCode ) ;
// 设置状态
String status = " running " ;
if ( iserror ) {
status = " error " ;
} else if ( phase = = 0x67 | | phase = = 0x71 | | phase = = 0x72 | | phase = = 0x73 | | phase = = 0x74 | | phase = = 0x75 ) {
status = " idle " ;
}
agvStatus . setStatus ( status ) ;
// 设置任务信息
if ( inst ! = null ) {
agvStatus . setTask_code ( inst . getTask_code ( ) ) ;
agvStatus . setInst_code ( String . valueOf ( ikey ) ) ;
}
// 设置阶段信息
agvStatus . setPhase ( phase ) ;
agvStatus . setPhase_name ( twoAgvPhase . getPhaseName ( phase ) ) ;
// 设置位置信息
String address = deviceService . queryDeviceCodeByAddress ( agvaddr ) ;
agvStatus . setAddress ( address ) ;
// 设置错误信息
agvStatus . setIs_error ( iserror ) ;
agvStatus . setError_code ( error_code ) ;
agvStatus . setError_message ( error_message ) ;
// 设置电量
agvStatus . setElectric_qty ( electric_qty ) ;
// 设置坐标和角度
agvStatus . setX ( x ) ;
agvStatus . setY ( y ) ;
agvStatus . setAngle ( angle ) ;
// 设置区域
agvStatus . setRegion ( region ) ;
// 设置在线状态
agvStatus . setIs_online ( isonline ) ;
// 更新到服务
agvStatusService . updateAgvStatus ( agvStatus ) ;
return agvStatus ;
} catch ( Exception e ) {
log . error ( " 更新AGV状态到服务失败: {} " , e . getMessage ( ) ) ;
}
return null ;
}
/**
*
* @param carno
* @param agvStatus
* @param device_code
* @param driver
* @param message
* @param expectValue
* @param actualVaue
*/
public void recordTaskStuckReason ( int carno , TwoFloorAgvStatus agvStatus , String device_code , String driver , String message , Map < String , Integer > expectValue , Map < String , Integer > actualVaue ) {
try {
// 解析错误信息, 提取action和mode不满足的原因
String act_action = String . valueOf ( actualVaue . get ( " act_action " ) ) ;
String act_mode = String . valueOf ( actualVaue . get ( " act_mode " ) ) ;
String act_error = String . valueOf ( actualVaue . get ( " act_error " ) ) ;
String act_move = String . valueOf ( actualVaue . get ( " act_move " ) ) ;
String exp_action = String . valueOf ( expectValue . get ( " ept_action " ) ) ;
String exp_mode = String . valueOf ( expectValue . get ( " ept_mode " ) ) ;
String exp_error = String . valueOf ( expectValue . get ( " ept_error " ) ) ;
String exp_move = String . valueOf ( expectValue . get ( " ept_move " ) ) ;
// 设置AGV车辆代码
String vehicleCode = String . format ( " AGV%02d " , carno ) ;
agvStatus . setVehicle_code ( vehicleCode ) ;
// 设置错误信息
agvStatus . setDriver ( driver ) ;
agvStatus . setIs_error ( true ) ;
agvStatus . setStatus ( " error " ) ;
agvStatus . setError_message ( message ) ;
agvStatus . setDevice_code ( device_code ) ;
agvStatus . setError_action ( act_action ) ;
agvStatus . setError_mode ( act_mode ) ;
agvStatus . setError_move ( act_move ) ;
agvStatus . setError_error ( act_error ) ;
agvStatus . setExp_action ( exp_action ) ;
agvStatus . setExp_mode ( exp_mode ) ;
agvStatus . setExp_move ( exp_move ) ;
agvStatus . setExp_error ( exp_error ) ;
StringBuffer messageSb = new StringBuffer ( ) ;
messageSb . append ( " 任务异常,phase " + agvStatus . getPhase ( ) ) ;
if ( expectValue . get ( " ept_action " ) ! = null ) {
messageSb . append ( " , 期望action: " + exp_action + " 实际action: " + act_action ) ;
}
if ( expectValue . get ( " ept_mode " ) ! = null ) {
messageSb . append ( " , 期望mode: " + exp_mode + " 实际mode: " + act_mode ) ;
}
if ( expectValue . get ( " ept_error " ) ! = null ) {
messageSb . append ( " , 期望error: " + exp_move + " 实际error: " + act_move ) ;
}
if ( expectValue . get ( " ept_move " ) ! = null ) {
messageSb . append ( " , 期望move: " + exp_error + " 实际move: " + act_error ) ;
}
agvStatus . setError_message ( messageSb . toString ( ) ) ;
// 更新到服务
agvStatusService . updateAgvStatus ( agvStatus ) ;
} catch ( Exception e ) {
log . error ( " 记录任务卡住原因失败: {} " , e . getMessage ( ) ) ;
}
}
private synchronized void setErrorInfo ( int error , String error_code , String error_message ) {
this . error = error ;
this . error_code = error_code ;
@@ -186,6 +336,9 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
//废箔称重位
WasteFoilWeighingStationDriver wasteFoilWeighingStationDriver ;
// 更新AGV状态信息到TwoFloorAgvStatusService
TwoFloorAgvStatus agvStatus = updateAgvStatusToService ( arr , carno , phase , ikey , agvaddr , inst , task ) ;
if ( phase = = 0x02 ) {
if ( ObjectUtil . isEmpty ( inst ) ) {
log . info ( " 未找到指令号{}对应的指令 " , ikey ) ;
@@ -300,7 +453,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
} else {
message = " 设备号: " + device_code + " 光电信号: " + standardInspectSiteDeviceDriver . getMove ( ) + " ,动作信号: " + standardInspectSiteDeviceDriver . getAction ( ) + " 报警信号: " + standardInspectSiteDeviceDriver . getError ( ) + " ,指令号: " + ikey + " 不满足取货条件 " ;
message = " 设备号: " + device_code + " 光电信号move : " + standardInspectSiteDeviceDriver . getMove ( ) + " ,动作信号action : " + standardInspectSiteDeviceDriver . getAction ( ) + " 报警信号: " + standardInspectSiteDeviceDriver . getError ( ) + " ,指令号: " + ikey + " 不满足取货条件 " ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , null ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , standardInspectSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , standardInspectSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , standardInspectSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , standardInspectSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " standardInspectSiteDeviceDriver " , message , eptMap , actMap ) ;
LuceneLogDto logDto = LuceneLogDto . builder ( )
. device_code ( this . getDeviceCode ( ) )
. content ( message )
@@ -331,6 +496,18 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , null ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , manipulatorAgvStationDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , manipulatorAgvStationDeviceDriver . getMode ( ) ) ;
// actMap.put("act_error",manipulatorAgvStationDeviceDriver.getError());
// actMap.put("act_move",manipulatorAgvStationDeviceDriver.getMove());
recordTaskStuckReason ( carno , agvStatus , device_code , " manipulatorAgvStationDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof HongXiangStationDeviceDriver ) {
hongXiangStationDeviceDriver = ( HongXiangStationDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -355,6 +532,18 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
// eptMap.put("ept_action",1);
// eptMap.put("ept_mode",null);
// eptMap.put("ept_error",0);
eptMap . put ( " ept_move " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
// actMap.put("act_action",hongXiangStationDeviceDriver.getAction());
// actMap.put("act_mode",hongXiangStationDeviceDriver.getMode());
// actMap.put("act_error",hongXiangStationDeviceDriver.getError());
actMap . put ( " act_move " , hongXiangStationDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " hongXiangStationDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof PaperTubePickSiteDeviceDriver ) {
paperTubePickSiteDeviceDriver = ( PaperTubePickSiteDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -380,6 +569,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , paperTubePickSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , paperTubePickSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , paperTubePickSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , paperTubePickSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " paperTubePickSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} /* else if (device.getDeviceDriver() instanceof RangingStationsDeviceDriver) {
rangingStationsDeviceDriver = (RangingStationsDeviceDriver) device.getDeviceDriver();
@@ -464,6 +666,20 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , wasteFoilWeighingStationDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , wasteFoilWeighingStationDriver . getMode ( ) ) ;
actMap . put ( " act_error " , wasteFoilWeighingStationDriver . getError ( ) ) ;
actMap . put ( " act_move " , wasteFoilWeighingStationDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " wasteFoilWeighingStationDriver " , message , eptMap , actMap ) ;
}
} else {
data = ndcAgvService . sendAgvTwoModeInst ( phase , index , 0 , 0 , 0 ) ;
@@ -591,6 +807,14 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
acsToWmsService . actionFinishRequest2 ( jsonObject ) ;
}
} else {
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 0 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , manipulatorAgvStationDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , manipulatorAgvStationDeviceDriver . getMode ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " manipulatorAgvStationDeviceDriver " , message , eptMap , actMap ) ;
LuceneLogDto logDto = LuceneLogDto . builder ( )
. device_code ( manipulatorAgvStationDeviceDriver . getDevice_code ( ) )
. content ( " 未给agv离开信号原因是: " + manipulatorAgvStationDeviceDriver . getDevice_code ( ) + " 动作信号不为0,当前的指令号为: " + inst . getInstruction_code ( ) )
@@ -621,6 +845,14 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_move " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_move " , hongXiangStationDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " hongXiangStationDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof PaperTubePickSiteDeviceDriver ) {
paperTubePickSiteDeviceDriver = ( PaperTubePickSiteDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -645,6 +877,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 0 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , paperTubePickSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , paperTubePickSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , paperTubePickSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , paperTubePickSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " paperTubePickSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof StandardInspectSiteDeviceDriver ) {
standardInspectSiteDeviceDriver = ( StandardInspectSiteDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -670,6 +915,14 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , - 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_error " , standardInspectSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , standardInspectSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " standardInspectSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof WasteFoilWeighingStationDriver ) {
wasteFoilWeighingStationDriver = ( WasteFoilWeighingStationDriver ) device . getDeviceDriver ( ) ;
@@ -697,6 +950,18 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , 0 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , wasteFoilWeighingStationDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , wasteFoilWeighingStationDriver . getMode ( ) ) ;
actMap . put ( " act_error " , wasteFoilWeighingStationDriver . getError ( ) ) ;
actMap . put ( " act_move " , wasteFoilWeighingStationDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " wasteFoilWeighingStationDriver " , message , eptMap , actMap ) ;
}
} else {
data = ndcAgvService . sendAgvTwoModeInst ( phase , index , 0 , 0 , 0 ) ;
@@ -820,6 +1085,15 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_action " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_mode " , manipulatorAgvStationDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_action " , manipulatorAgvStationDeviceDriver . getAction ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " manipulatorAgvStationDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof PaperTubePickSiteDeviceDriver ) {
paperTubePickSiteDeviceDriver = ( PaperTubePickSiteDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -845,6 +1119,17 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_action " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_error " , paperTubePickSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_mode " , paperTubePickSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_action " , paperTubePickSiteDeviceDriver . getAction ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " paperTubePickSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof HongXiangStationDeviceDriver ) {
hongXiangStationDeviceDriver = ( HongXiangStationDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -869,6 +1154,14 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_move " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_move " , hongXiangStationDeviceDriver . getError ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " paperTubePickSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof StandardInspectSiteDeviceDriver ) {
standardInspectSiteDeviceDriver = ( StandardInspectSiteDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -894,6 +1187,20 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , null ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , standardInspectSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , standardInspectSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , standardInspectSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , standardInspectSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " standardInspectSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} /* else if (device.getDeviceDriver() instanceof RangingStationsDeviceDriver) {
rangingStationsDeviceDriver = (RangingStationsDeviceDriver) device.getDeviceDriver();
@@ -1024,7 +1331,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
}
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , null ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , manipulatorAgvStationDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , manipulatorAgvStationDeviceDriver . getMode ( ) ) ;
// actMap.put("act_error",manipulatorAgvStationDeviceDriver.getError());
// actMap.put("act_move",manipulatorAgvStationDeviceDriver.getMove());
recordTaskStuckReason ( carno , agvStatus , device_code , " manipulatorAgvStationDeviceDriver " , message , eptMap , actMap ) ; }
}
} else if ( ObjectUtil . isNotEmpty ( start_device_code ) & & StrUtil . equals ( device_code , next_device_code ) ) {
if ( device . getDeviceDriver ( ) instanceof ManipulatorAgvStationDeviceDriver ) {
@@ -1051,7 +1370,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
}
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , null ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , manipulatorAgvStationDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , manipulatorAgvStationDeviceDriver . getMode ( ) ) ;
// actMap.put("act_error",manipulatorAgvStationDeviceDriver.getError());
// actMap.put("act_move",manipulatorAgvStationDeviceDriver.getMove());
recordTaskStuckReason ( carno , agvStatus , device_code , " manipulatorAgvStationDeviceDriver " , message , eptMap , actMap ) ; }
}
} else if ( ObjectUtil . isNotEmpty ( start_device_code ) & & StrUtil . equals ( device_code , start_device_code2 ) ) {
if ( device . getDeviceDriver ( ) instanceof ManipulatorAgvStationDeviceDriver ) {
@@ -1078,7 +1409,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
}
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , null ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , manipulatorAgvStationDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , manipulatorAgvStationDeviceDriver . getMode ( ) ) ;
// actMap.put("act_error",manipulatorAgvStationDeviceDriver.getError());
// actMap.put("act_move",manipulatorAgvStationDeviceDriver.getMove());
recordTaskStuckReason ( carno , agvStatus , device_code , " manipulatorAgvStationDeviceDriver " , message , eptMap , actMap ) ; }
}
} else if ( ObjectUtil . isNotEmpty ( start_device_code ) & & StrUtil . equals ( device_code , next_device_code2 ) ) {
if ( device . getDeviceDriver ( ) instanceof ManipulatorAgvStationDeviceDriver ) {
@@ -1105,7 +1448,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
}
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , null ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , manipulatorAgvStationDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , manipulatorAgvStationDeviceDriver . getMode ( ) ) ;
// actMap.put("act_error",manipulatorAgvStationDeviceDriver.getError());
// actMap.put("act_move",manipulatorAgvStationDeviceDriver.getMove());
recordTaskStuckReason ( carno , agvStatus , device_code , " manipulatorAgvStationDeviceDriver " , message , eptMap , actMap ) ; }
}
}
// else {
@@ -1220,6 +1575,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_move " , 0 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_move " , hongXiangStationDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " hongXiangStationDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof ManipulatorAgvStationDeviceDriver ) {
manipulatorAgvStationDeviceDriver = ( ManipulatorAgvStationDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -1256,7 +1618,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
}
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 0 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , null ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , manipulatorAgvStationDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , manipulatorAgvStationDeviceDriver . getMode ( ) ) ;
// actMap.put("act_error",manipulatorAgvStationDeviceDriver.getError());
// actMap.put("act_move",manipulatorAgvStationDeviceDriver.getMove());
recordTaskStuckReason ( carno , agvStatus , device_code , " manipulatorAgvStationDeviceDriver " , message , eptMap , actMap ) ; }
} else if ( device . getDeviceDriver ( ) instanceof PaperTubePickSiteDeviceDriver ) {
paperTubePickSiteDeviceDriver = ( PaperTubePickSiteDeviceDriver ) device . getDeviceDriver ( ) ;
try {
@@ -1281,6 +1655,20 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , paperTubePickSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , paperTubePickSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , paperTubePickSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , paperTubePickSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " paperTubePickSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof StandardInspectSiteDeviceDriver ) {
standardInspectSiteDeviceDriver = ( StandardInspectSiteDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -1306,6 +1694,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , null ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , standardInspectSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , standardInspectSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , standardInspectSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , standardInspectSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " standardInspectSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} else {
data = ndcAgvService . sendAgvTwoModeInst ( phase , index , 0 , 0 , 0 ) ;
@@ -1431,6 +1832,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , paperTubePickSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , paperTubePickSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , paperTubePickSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , paperTubePickSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " paperTubePickSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof ManipulatorAgvStationDeviceDriver ) {
manipulatorAgvStationDeviceDriver = ( ManipulatorAgvStationDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -1457,7 +1871,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
}
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , null ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , manipulatorAgvStationDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , manipulatorAgvStationDeviceDriver . getMode ( ) ) ;
// actMap.put("act_error",manipulatorAgvStationDeviceDriver.getError());
// actMap.put("act_move",manipulatorAgvStationDeviceDriver.getMove());
recordTaskStuckReason ( carno , agvStatus , device_code , " manipulatorAgvStationDeviceDriver " , message , eptMap , actMap ) ; }
} else if ( device . getDeviceDriver ( ) instanceof HongXiangStationDeviceDriver ) {
hongXiangStationDeviceDriver = ( HongXiangStationDeviceDriver ) device . getDeviceDriver ( ) ;
try {
@@ -1483,6 +1909,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_move " , 0 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_move " , hongXiangStationDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " hongXiangStationDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof StandardInspectSiteDeviceDriver ) {
standardInspectSiteDeviceDriver = ( StandardInspectSiteDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -1509,6 +1942,20 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , null ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , 0 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , standardInspectSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , standardInspectSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , standardInspectSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , standardInspectSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " standardInspectSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} /* else if (device.getDeviceDriver() instanceof RangingStationsDeviceDriver) {
rangingStationsDeviceDriver = (RangingStationsDeviceDriver) device.getDeviceDriver();
@@ -1589,6 +2036,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , 0 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , wasteFoilWeighingStationDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , wasteFoilWeighingStationDriver . getMode ( ) ) ;
actMap . put ( " act_error " , wasteFoilWeighingStationDriver . getError ( ) ) ;
actMap . put ( " act_move " , wasteFoilWeighingStationDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " wasteFoilWeighingStationDriver " , message , eptMap , actMap ) ;
}
} else {
data = ndcAgvService . sendAgvTwoModeInst ( phase , index , 0 , 0 , 0 ) ;
@@ -1686,7 +2146,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
}
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 0 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , null ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , manipulatorAgvStationDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , manipulatorAgvStationDeviceDriver . getMode ( ) ) ;
// actMap.put("act_error",manipulatorAgvStationDeviceDriver.getError());
// actMap.put("act_move",manipulatorAgvStationDeviceDriver.getMove());
recordTaskStuckReason ( carno , agvStatus , device_code , " manipulatorAgvStationDeviceDriver " , message , eptMap , actMap ) ; }
} else if ( device . getDeviceDriver ( ) instanceof HongXiangStationDeviceDriver ) {
hongXiangStationDeviceDriver = ( HongXiangStationDeviceDriver ) device . getDeviceDriver ( ) ;
try {
@@ -1712,6 +2184,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_move " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_move " , hongXiangStationDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " hongXiangStationDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof PaperTubePickSiteDeviceDriver ) {
paperTubePickSiteDeviceDriver = ( PaperTubePickSiteDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -1773,6 +2252,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 0 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , paperTubePickSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , paperTubePickSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , paperTubePickSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , paperTubePickSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " paperTubePickSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof StandardInspectSiteDeviceDriver ) {
standardInspectSiteDeviceDriver = ( StandardInspectSiteDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -1797,6 +2289,17 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_move " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , standardInspectSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , standardInspectSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , standardInspectSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , standardInspectSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " standardInspectSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof WasteFoilWeighingStationDriver ) {
wasteFoilWeighingStationDriver = ( WasteFoilWeighingStationDriver ) device . getDeviceDriver ( ) ;
@@ -1826,6 +2329,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , wasteFoilWeighingStationDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , wasteFoilWeighingStationDriver . getMode ( ) ) ;
actMap . put ( " act_error " , wasteFoilWeighingStationDriver . getError ( ) ) ;
actMap . put ( " act_move " , wasteFoilWeighingStationDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " wasteFoilWeighingStationDriver " , message , eptMap , actMap ) ;
}
} else {
data = ndcAgvService . sendAgvTwoModeInst ( phase , index , 0 , 0 , 0 ) ;
@@ -1927,7 +2443,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
}
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , null ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , manipulatorAgvStationDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , manipulatorAgvStationDeviceDriver . getMode ( ) ) ;
// actMap.put("act_error",manipulatorAgvStationDeviceDriver.getError());
// actMap.put("act_move",manipulatorAgvStationDeviceDriver.getMove());
recordTaskStuckReason ( carno , agvStatus , device_code , " manipulatorAgvStationDeviceDriver " , message , eptMap , actMap ) ; }
} else if ( device . getDeviceDriver ( ) instanceof HongXiangStationDeviceDriver ) {
hongXiangStationDeviceDriver = ( HongXiangStationDeviceDriver ) device . getDeviceDriver ( ) ;
try {
@@ -1953,6 +2481,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_move " , 0 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_move " , hongXiangStationDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " hongXiangStationDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof PaperTubePickSiteDeviceDriver ) {
paperTubePickSiteDeviceDriver = ( PaperTubePickSiteDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -1980,6 +2515,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , paperTubePickSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , paperTubePickSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , paperTubePickSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , paperTubePickSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " paperTubePickSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof StandardInspectSiteDeviceDriver ) {
standardInspectSiteDeviceDriver = ( StandardInspectSiteDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -2006,6 +2554,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , null ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , 0 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , standardInspectSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , standardInspectSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , standardInspectSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , standardInspectSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " standardInspectSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} /* else if (device.getDeviceDriver() instanceof RangingStationsDeviceDriver) {
rangingStationsDeviceDriver = (RangingStationsDeviceDriver) device.getDeviceDriver();
@@ -2161,7 +2722,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
}
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 0 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , null ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , manipulatorAgvStationDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , manipulatorAgvStationDeviceDriver . getMode ( ) ) ;
// actMap.put("act_error",manipulatorAgvStationDeviceDriver.getError());
// actMap.put("act_move",manipulatorAgvStationDeviceDriver.getMove());
recordTaskStuckReason ( carno , agvStatus , device_code , " manipulatorAgvStationDeviceDriver " , message , eptMap , actMap ) ; }
} else if ( device . getDeviceDriver ( ) instanceof PaperTubePickSiteDeviceDriver ) {
paperTubePickSiteDeviceDriver = ( PaperTubePickSiteDeviceDriver ) device . getDeviceDriver ( ) ;
try {
@@ -2188,6 +2761,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , 2 ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , null ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , paperTubePickSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , paperTubePickSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , paperTubePickSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , paperTubePickSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " paperTubePickSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof HongXiangStationDeviceDriver ) {
hongXiangStationDeviceDriver = ( HongXiangStationDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -2214,6 +2800,14 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_move " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_move " , hongXiangStationDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " hongXiangStationDeviceDriver " , message , eptMap , actMap ) ;
}
} else if ( device . getDeviceDriver ( ) instanceof StandardInspectSiteDeviceDriver ) {
standardInspectSiteDeviceDriver = ( StandardInspectSiteDeviceDriver ) device . getDeviceDriver ( ) ;
@@ -2238,6 +2832,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
. build ( ) ;
logDto . setLog_level ( 4 ) ;
luceneExecuteLogService . deviceExecuteLog ( logDto ) ;
// 记录任务卡住原因
Map < String , Integer > eptMap = new HashMap < > ( ) ;
eptMap . put ( " ept_action " , 1 ) ;
eptMap . put ( " ept_mode " , null ) ;
eptMap . put ( " ept_error " , 0 ) ;
eptMap . put ( " ept_move " , 1 ) ;
Map < String , Integer > actMap = new HashMap < > ( ) ;
actMap . put ( " act_action " , standardInspectSiteDeviceDriver . getAction ( ) ) ;
actMap . put ( " act_mode " , standardInspectSiteDeviceDriver . getMode ( ) ) ;
actMap . put ( " act_error " , standardInspectSiteDeviceDriver . getError ( ) ) ;
actMap . put ( " act_move " , standardInspectSiteDeviceDriver . getMove ( ) ) ;
recordTaskStuckReason ( carno , agvStatus , device_code , " standardInspectSiteDeviceDriver " , message , eptMap , actMap ) ;
}
} else {
data = ndcAgvService . sendAgvTwoModeInst ( phase , index , 0 , 0 , 0 ) ;