add:电器光电添加、任务校验

This commit is contained in:
ls
2025-05-23 14:03:08 +08:00
parent ede9c8a903
commit 299164fc4a
9 changed files with 103 additions and 142 deletions

View File

@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.StringUtils;
import org.nl.config.lucene.TagNameEnum;
import org.nl.wms.ext.acs.service.WmsToAcsService;
import org.nl.wms.pda.mps.service.SlitterPdaService;
@@ -191,6 +192,9 @@ public class SlitterPdaServiceImpl implements SlitterPdaService {
if (schBaseTasks.size() > 0) {
throw new BadRequestException("点位[" + pointCode + "]已经存在任务!");
}
if (StrUtil.contains(pointCode,"_M")){
throw new BadRequestException("空轴送回请扫空轴位");
}
param.put("device_code", pointCode);
param.put("config_code", "SlitterSendRollAGVTask");
// 最后一趟送回去的才需要清

View File

@@ -75,6 +75,9 @@ public class InHotTrussTask extends AbstractTask {
String flag = "0";
PdmBiRawfoilworkorder order = rawfoilworkorderService.getByContainerName(orderCode);
// TODO: 没有设置是否烘烤、时间、温度、不继续
if (GeneralDefinition.NO.equals(order.getIs_baking())){
throw new BadRequestException("手持下错任务,必须要烘烤");
}
if (ObjectUtil.isNotNull(order)&&GeneralDefinition.YES.equals(order.getIs_baking())&& StrUtil.isEmpty(isStorage)) {
String bakingTemperature = order.getBaking_temperature();

View File

@@ -114,9 +114,13 @@ public class SlitterUpAGVTask extends AbstractTask {
cutpointivtService.updateById(cutPoint);
//更新收卷锟缓存位库存
String pointCode4 = taskObj.getPoint_code4();
String pointCode1 = taskObj.getPoint_code1();
SchBasePoint point4 = pointService.query().eq("point_code", pointCode4).one();
SchBasePoint point1 = pointService.query().eq("point_code", pointCode1).one();
point4.setPoint_status("2");
pointService.updateById(point4);
point1.setPoint_status("1");
pointService.updateById(point1);
if (ObjectUtil.isNotEmpty(taskObj.getPoint_code3())) {
// 四点任务,还需要创建收卷辊桁架任务
JSONObject taskParam = new JSONObject();

View File

@@ -17,6 +17,7 @@ import org.nl.wms.sch.task_manage.AbstractTask;
import org.nl.wms.sch.task_manage.TaskStatus;
import org.nl.wms.sch.task_manage.core.constant.GeneralDefinition;
import org.nl.wms.sch.task_manage.core.enums.TaskFinishedTypeEnum;
import org.nl.wms.util.PointUtils;
import org.nl.wms.util.TaskUtils;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
@@ -106,6 +107,12 @@ public class SlitterUpTrussTask extends AbstractTask {
// 起点清空
hotClearPoint(startHotPoint, taskFinishedType);
}
SchBasePoint endPoint = pointService.getById(endPointCode);
endPoint.setPoint_status("4");
endPoint.setVehicle_code(taskObj.getVehicle_code());
PointUtils.setUpdateByType(endPoint, taskFinishedType);
pointService.updateById(endPoint);
// 创建AGV任务
log.info("点位{}更新完毕创建AGV任务给分切机上料", startPointCode);