update:
安全距离修改; 缓存任务进炉前校验任务状态;
This commit is contained in:
parent
17f5ddbfa0
commit
2def9c889f
@ -122,16 +122,22 @@ public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetSe
|
||||
while (iterator.hasNext()){
|
||||
CurrTaskDet currTaskDet = iterator.next();
|
||||
CurrTaskVo byId = currTaskService.getCurrTask(IdParam.builder().id(currTaskDet.getCurrTaskId()).build());
|
||||
if (byId.getStatus()==2){
|
||||
iterator.remove();
|
||||
continue;
|
||||
}
|
||||
//如果加工类型是复加工,或者任务作废。移除对象
|
||||
if (byId.getProcessType().equals(2) || byId.getValid() != 1)
|
||||
{
|
||||
iterator.remove();
|
||||
continue;
|
||||
}
|
||||
//如果是多步骤任务且不是第一步,移除对象
|
||||
if (byId.getIsAuto()==1){
|
||||
AutoExeTask autoExeTask = autoExeTaskServiceBiz.getById(byId.getAutoExeTaskId());
|
||||
if (!byId.getId().equals(autoExeTask.getFTaskId())){
|
||||
iterator.remove();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
Integer status = sendTaskToRgv(vehicleId, currTaskId, startPoint, endPoint, currTask.getPlcValue());
|
||||
//执行成功,托盘进炉
|
||||
if (status == 1) {
|
||||
|
||||
logger.info(String.valueOf(status));
|
||||
logger.info("===执行任务:" + currTaskId + " ,车辆搬运任务,车辆:" + vehicleId + " ,起点:" + startPoint + " ,终点:" + endPoint + "任务执行成功===");
|
||||
//更新调度表状态为完成
|
||||
runTask.setUpdateTime(LocalDateTime.now());
|
||||
@ -317,6 +317,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
Long endPoint = pointInfoServiceBiz.getOne(new QueryWrapper<PointInfo>().eq(PointInfo.NOTE, runTask.getEndPosition())).getCode();
|
||||
Integer status = sendTaskToRgv(vehicleId, currTaskId, startPoint, endPoint, currTask.getPlcValue());
|
||||
if (status == 1) {
|
||||
logger.info(String.valueOf(status));
|
||||
logger.info("===执行任务:" + currTaskId + " ,车辆搬运任务,车辆:" + vehicleId + " ,起点:" + startPoint + " ,终点:" + endPoint + "任务执行成功===");
|
||||
//更新关系表状态为完成
|
||||
runTask.setUpdateTime(LocalDateTime.now());
|
||||
@ -416,6 +417,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
Long endPoint = pointInfoServiceBiz.getOne(new QueryWrapper<PointInfo>().eq(PointInfo.NOTE, runTask.getEndPosition())).getCode();
|
||||
Integer status = sendTaskToRgv(vehicleId, currTaskId, startPoint, endPoint, currTask.getPlcValue());
|
||||
if (status == 1) {
|
||||
logger.info(String.valueOf(status));
|
||||
logger.info("===执行任务:" + currTaskId + " ,车辆搬运任务,车辆:" + vehicleId + " ,起点:" + startPoint + " ,终点:" + endPoint + "任务执行成功===");
|
||||
//更新关系表状态为完成
|
||||
runTask.setUpdateTime(LocalDateTime.now());
|
||||
@ -550,6 +552,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
Integer status = sendTaskToRgv(vehicleId, 0L, startPoint, endPoint, 0);
|
||||
logger.info(status.toString());
|
||||
if (status == 1) {
|
||||
logger.info(String.valueOf(status));
|
||||
logger.info("===执行任务出库任务,车辆搬运任务,车辆:" + vehicleId + " ,起点:" + startPoint + " ,终点:" + endPoint + "任务执行成功===");
|
||||
//更新调度任务表状态为完成
|
||||
runTask.setUpdateTime(LocalDateTime.now());
|
||||
@ -649,6 +652,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
Long endPoint = pointInfoServiceBiz.getOne(new QueryWrapper<PointInfo>().eq(PointInfo.NOTE, runTask.getEndPosition())).getCode();
|
||||
Integer status = sendTaskToRgv(vehicleId, 0L, startPoint, endPoint, 0);
|
||||
if (status == 1) {
|
||||
logger.info(String.valueOf(status));
|
||||
logger.info("===执行任务出库任务,车辆搬运任务,车辆:" + vehicleId + " ,起点:" + startPoint + " ,终点:" + endPoint + "任务执行成功===");
|
||||
//更新调度任务表状态为完成
|
||||
runTask.setUpdateTime(LocalDateTime.now());
|
||||
|
@ -582,6 +582,10 @@ public class ScheduledTask extends BaseService {
|
||||
logger.info("加工炉"+kilnInfo.getCode()+"readyIn为"+kilnReadyIn.toString()+" allowIn为"+kilnAllowIn.toString());
|
||||
logger.info("缓存区等待队列第一位:"+inStockInfo.toString());
|
||||
CurrTask currTask = currTaskServiceBiz.getById(inStockInfo.getTaskId());
|
||||
if (currTask.getStatus()!=0){
|
||||
logger.info(inStockInfo.toString()+"该缓存对应的任务状态为:"+currTask.getStatus()+"不能发起任务。");
|
||||
webSocketServer.sendtoUser(inStockInfo.getLocationName()+"对应的缓存加工任务状态不为未加工,不能发起任务,请先确认任务状态!","1");
|
||||
}
|
||||
Location location = locationServiceBiz.getById(inStockInfo.getLocationId());
|
||||
//是否有小车在运行
|
||||
List<VehicleInfo> vehicleInfoList = vehicleInfoServiceBiz.list(new QueryWrapper<VehicleInfo>().eq(VehicleInfo.STATUS, 1));
|
||||
|
@ -121,10 +121,10 @@ public class TaskDistanceUtils {
|
||||
if (otherNowPosition>=minDistance&&otherNowPosition<=maxDistance){
|
||||
return true;
|
||||
}else {
|
||||
if (Math.abs(otherNowPosition-maxDistance)<2){
|
||||
if (Math.abs(otherNowPosition-maxDistance)<3.5){
|
||||
return true;
|
||||
}
|
||||
if (Math.abs(otherNowPosition-minDistance)<2){
|
||||
if (Math.abs(otherNowPosition-minDistance)<3.5){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user