巷道口输送机下发读值校验优化
This commit is contained in:
@@ -490,30 +490,33 @@ public class RoadConvThread implements Runnable {
|
||||
//如果已经生成入库任务 - 向输送机下发任务号
|
||||
mydoJobStockin = mydoJobService.selectMydoJobList(mydoJobStockin).get(0);
|
||||
|
||||
//执行下发后再次读输送机任务号检查是否写入成功
|
||||
boolean sendConvIsSuccess = mydoJobStockin.getTaskNo().equals(getRoadConvTaskNo(inSsjDevice.getDeviceCode()));
|
||||
if (!sendConvIsSuccess){
|
||||
//输送机去向值【1】
|
||||
int i = writeToSsj(inSsjDevice.getPlcDbWriteAddress(), mydoJobStockin.getTaskNo(), 1, 1);
|
||||
//输送机去向值【1】
|
||||
int i = writeToSsj(inSsjDevice.getPlcDbWriteAddress(), mydoJobStockin.getTaskNo(), 1, 1);
|
||||
|
||||
if (i == 1) {
|
||||
//写入成功则更新执行阶段
|
||||
mydoJobStockin.setStatus(TASK_STATUS_RUNNING);
|
||||
mydoJobStockin.setExecutionPhase(TASK_EP_ROADWAY_SSJ);
|
||||
// mydoJobStockin.setEntranceId(inSsjDevice.getDeviceCode());
|
||||
mydoJobStockin.setStartTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
mydoJobService.updateMydoJob(mydoJobStockin);
|
||||
log.info("【更新状态】巷道输送机{}入库到位,下发成功,任务号:{},等待堆垛机取货", inSsjDevice.getDeviceCode(), mydoJobStockin.getTaskNo());
|
||||
}else{
|
||||
log.info("【更新状态】巷道输送机{}入库到位,下发失败,任务号:{},等待重试中...", inSsjDevice.getDeviceCode(), mydoJobStockin.getTaskNo());
|
||||
if (i == 1) {
|
||||
|
||||
//执行下发后再次读输送机任务号检查是否写入成功
|
||||
boolean sendConvIsSuccess = Convert.toInt(mydoJobStockin.getTaskNo()) == getRoadConvTaskNo(inSsjDevice.getDeviceCode());
|
||||
if (!sendConvIsSuccess){
|
||||
log.info("【更新状态】巷道口输送机{}未获取到下发任务号:{},等待重试中...", inSsjDevice.getDeviceCode(), mydoJobStockin.getTaskNo());
|
||||
return;
|
||||
}
|
||||
|
||||
//写入成功则更新执行阶段
|
||||
mydoJobStockin.setStatus(TASK_STATUS_RUNNING);
|
||||
mydoJobStockin.setExecutionPhase(TASK_EP_ROADWAY_SSJ);
|
||||
// mydoJobStockin.setEntranceId(inSsjDevice.getDeviceCode());
|
||||
mydoJobStockin.setStartTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
mydoJobService.updateMydoJob(mydoJobStockin);
|
||||
log.info("【更新状态】巷道输送机{}入库到位,下发成功,任务号:{},等待堆垛机取货", inSsjDevice.getDeviceCode(), mydoJobStockin.getTaskNo());
|
||||
}else{
|
||||
log.info("【更新状态】巷道口输送机{}已获取到下发任务号,继续执行中,任务号:{}", inSsjDevice.getDeviceCode(), mydoJobStockin.getTaskNo());
|
||||
log.info("【更新状态】巷道输送机{}入库到位,下发失败,任务号:{},等待重试中...", inSsjDevice.getDeviceCode(), mydoJobStockin.getTaskNo());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user