fix: 管芯托盘全托盘一致管芯不需要校验差别
opt: B1烘箱设置为定时任务自动触发
This commit is contained in:
@@ -187,7 +187,7 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
|
||||
String nextMaterialName = nextPaper.getMaterial_name();
|
||||
String[] nextArray = nextMaterialName.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
|
||||
int nextLength = Integer.parseInt(nextArray[nextArray.length - 1]);
|
||||
if (Math.abs(nextLength - currLength) <= 50) {
|
||||
if (Math.abs(nextLength - currLength) <= 50 && !material_code.equals(nextPaper.getMaterial_code())) {
|
||||
throw new BadRequestException("相邻排的纸管高度差要大于等于50MM!");
|
||||
}
|
||||
}
|
||||
@@ -201,7 +201,7 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
|
||||
String nextMaterialName = nextPaper.getMaterial_name();
|
||||
String[] nextArray = nextMaterialName.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
|
||||
int nextLength = Integer.parseInt(nextArray[nextArray.length - 1]);
|
||||
if (Math.abs(nextLength - currLength) <= 50) {
|
||||
if (Math.abs(nextLength - currLength) <= 50 && !material_code.equals(nextPaper.getMaterial_code())) {
|
||||
throw new BadRequestException("相邻排的纸管高度差要大于等于50MM!");
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,7 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
|
||||
String preMaterialName = prePaper.getMaterial_name();
|
||||
String[] preArray = preMaterialName.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
|
||||
int preLength = Integer.parseInt(preArray[preArray.length - 1]);
|
||||
if (Math.abs(preLength - currLength) <= 50) {
|
||||
if (Math.abs(preLength - currLength) <= 50 && !material_code.equals(prePaper.getMaterial_code())) {
|
||||
throw new BadRequestException("相邻排的纸管高度差要大于等于50MM!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -898,7 +898,8 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
deleteWrapper.eq("vehicle_code", vehicleCode)
|
||||
.eq("row_num", param.getString("row_num"))
|
||||
.eq("qty", "0");
|
||||
papervehicleService.remove(deleteWrapper);
|
||||
boolean remove = papervehicleService.remove(deleteWrapper);
|
||||
// todo: 如果等于0,则创建AGV任务,将托盘拉回去
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("status", HttpStatus.HTTP_OK);
|
||||
res.put("message", "请求成功!");
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package org.nl.wms.sch.manage;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.wms.sch.tasks.InHotTask;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Date: 2025/2/21
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class AutoIntoHotCacheTask {
|
||||
|
||||
@Autowired
|
||||
private IschBaseTaskService taskService;
|
||||
|
||||
@SneakyThrows
|
||||
public void run() {
|
||||
log.info("定时对B1入暂存....");
|
||||
List<SchBaseTask> tasks = taskService.list(new LambdaQueryWrapper<SchBaseTask>()
|
||||
.eq(SchBaseTask::getTask_code, "010206")
|
||||
.eq(SchBaseTask::getIs_delete, "0")
|
||||
.eq(SchBaseTask::getTask_status, TaskStatusEnum.SURE_START.getCode()));
|
||||
for (SchBaseTask task : tasks) {
|
||||
JSONObject cache_param = JSONObject.parseObject(task.getRequest_param());
|
||||
JSONObject cache_jo = WQL.getWO("PDA_COOLIN").addParamMap(cache_param).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(cache_jo) || ObjectUtil.isEmpty(cache_jo.getString("point_code"))) {
|
||||
log.info("烘箱对接位:{} 没找到暂存位!", task.getPoint_code1());
|
||||
return;
|
||||
}
|
||||
task.setTask_status(TaskStatusEnum.START_AND_POINT.getCode());
|
||||
task.setPoint_code2(cache_jo.getString("point_code"));
|
||||
task.setRemark("-");
|
||||
task.setUpdate_time(DateUtil.now());
|
||||
task.setTask_type("010204");
|
||||
taskService.updateById(task);
|
||||
new InHotTask().immediateNotifyAcs(task.getTask_id());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -205,7 +205,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
if (jsonTask.getString("task_type").equals("010104")) {
|
||||
// 校验终点是否存在
|
||||
JSONObject jsonIvt2 = point_tab.query("point_code ='" + point_code4 + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) {
|
||||
if (ObjectUtil.isEmpty(jsonIvt2)) {
|
||||
throw new BadRequestException("终点未找到可用点位:" + point_code2);
|
||||
}
|
||||
|
||||
@@ -217,17 +217,35 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
cache_param.put("product_area", jsonIvt.getString("product_area"));
|
||||
JSONObject cache_jo = WQL.getWO("PDA_COOLIN").addParamMap(cache_param).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(cache_jo) || ObjectUtil.isEmpty(cache_jo.getString("point_code"))) {
|
||||
throw new BadRequestException("未查询到可用的冷却区暂存位!");
|
||||
// 创建半条任务
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("task_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
jo.put("task_code", IdUtil.getSnowflake(1, 1).nextId());
|
||||
jo.put("task_type", "010206");
|
||||
jo.put("task_status", TaskStatusEnum.SURE_START.getCode());
|
||||
jo.put("point_code1", point_code4);
|
||||
jo.put("point_code2", "");
|
||||
jo.put("material_code", jsonTask.getString("material_code"));
|
||||
jo.put("product_area", jsonTask.getString("product_area"));
|
||||
jo.put("handle_class", InHotTask.class.getName());
|
||||
jo.put("remark", "未查询到可用的冷却区暂存位");
|
||||
jo.put("request_param", cache_param);
|
||||
jo.put("type", "3");
|
||||
jo.put("priority", "1");
|
||||
jo.put("create_time", DateUtil.now());
|
||||
jo.put("acs_task_type", "6");
|
||||
taskTab.insert(jo);
|
||||
// throw new BadRequestException("未查询到可用的冷却区暂存位!");
|
||||
} else {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("point_code1", point_code4);
|
||||
param.put("point_code2", cache_jo.getString("point_code"));
|
||||
param.put("material_code", jsonTask.getString("material_code"));
|
||||
param.put("product_area", jsonTask.getString("product_area"));
|
||||
param.put("type", "3");
|
||||
InHotTask inHotTask = SpringContextHolder.getBean(InHotTask.class);
|
||||
inHotTask.createTask(param);
|
||||
}
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("point_code1", point_code4);
|
||||
param.put("point_code2", cache_jo.getString("point_code"));
|
||||
param.put("material_code", jsonTask.getString("material_code"));
|
||||
param.put("product_area", jsonTask.getString("product_area"));
|
||||
param.put("type", "3");
|
||||
InHotTask inHotTask = SpringContextHolder.getBean(InHotTask.class);
|
||||
inHotTask.createTask(param);
|
||||
|
||||
// 更新点位库存状态
|
||||
jsonIvt2.put("point_status", "2");
|
||||
jsonIvt2.put("material_code", jsonTask.getString("material_code"));
|
||||
|
||||
Reference in New Issue
Block a user