Merge branch 'master' of http://git.picaiba.com/mt-ck/mt-qj-wms-hd
This commit is contained in:
commit
9d8b6c065f
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -473,6 +473,13 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
|
||||
autoExeTaskServiceBiz.removeById(currTask.getAutoExeTaskId());
|
||||
for (CurrTask currTask1:currTaskList
|
||||
) {
|
||||
InStockInfo inStockInfo = inStockInfoServiceBiz.getOne(new QueryWrapper<InStockInfo>().eq(InStockInfo.TASK_ID, currTask1.getId()));
|
||||
if (inStockInfo!=null){
|
||||
Location location = locationServiceBiz.getById(inStockInfo.getLocationId());
|
||||
location.setStatus(0);
|
||||
locationServiceBiz.updateById(location);
|
||||
inStockInfoServiceBiz.removeById(inStockInfo);
|
||||
}
|
||||
currTaskDetServiceBiz.remove(new QueryWrapper<CurrTaskDet>().eq(CurrTaskDet.CURR_TASK_ID,currTask1.getId()));
|
||||
currTaskServiceBiz.removeById(currTask1);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Ladataan…
Viittaa uudesa ongelmassa
Block a user