fix:出空木箱浅货位有验箱锁也不进行出库
This commit is contained in:
@@ -491,7 +491,6 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
boxAttr.put("lock_type", IOSEnum.LOCK_TYPE.code("出库锁"));
|
||||
attrTab.update(boxAttr);
|
||||
twoOutBoxTask.createTask(jsonTaskParam);
|
||||
twoOutBoxTask.immediateNotifyAcs(null);
|
||||
PdmProductSpecServiceImpl.doRecord(SpecEnum.ZXRK, null, Boolean.TRUE, null, containerList);
|
||||
|
||||
}
|
||||
|
||||
@@ -100,19 +100,9 @@ public class TwoOutBoxTask extends AbstractAcsTask {
|
||||
if (浅Attr.getString("lock_type").equals(IOSEnum.LOCK_TYPE.code("未锁定"))) {
|
||||
// 判断浅货位木箱和深货位木箱是否相同规格
|
||||
outBoxManageService.createBoxMove(浅Attr);
|
||||
} else if (浅Attr.getString("lock_type").equals(IOSEnum.LOCK_TYPE.code("验箱出库锁"))) {
|
||||
List<SchBaseTask> list = ischBaseTaskService.list(new QueryWrapper<SchBaseTask>()
|
||||
.eq("is_delete", "0")
|
||||
.eq("point_code1", 浅Attr.getString("struct_code"))
|
||||
.lt("task_status", TaskStatusEnum.FINISHED.getCode()));
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
json.put("remark", "当前仓位对应的浅货位【" + 浅Attr.getString("struct_code") + "有正在执行中的任务,任务完成后才能下发!】");
|
||||
WQLObject.getWQLObject("SCH_BASE_Task").update(json);
|
||||
continue;
|
||||
} else {
|
||||
outBoxManageService.createBoxMove(浅Attr);
|
||||
}
|
||||
} else {
|
||||
json.put("remark", "当前仓位对应的浅货位【" + 浅Attr.getString("struct_code") + "被锁定!】");
|
||||
WQLObject.getWQLObject("SCH_BASE_Task").update(json);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,35 +4,25 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
|
||||
import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService;
|
||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||
import org.nl.b_lms.sch.tasks.TwoOutBoxTask;
|
||||
import org.nl.b_lms.sch.tasks.first_floor_area.ShiftingTask;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.OutBoxManageService;
|
||||
import org.nl.common.enums.PackageInfoIvtEnum;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.wms.sch.AcsTaskDto;
|
||||
import org.nl.wms.sch.AcsUtil;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.redisson.api.RLock;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.nl.wms.util.TaskUtil.getRoutePlanCode;
|
||||
|
||||
@@ -59,26 +49,6 @@ public class AutoIssueOutEmptyTask {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a task that processes ACS (Automation Control System) tasks.
|
||||
*
|
||||
* This method checks the number of active tasks and ensures the limit is not exceeded.
|
||||
* If tasks are eligible for further processing, it retrieves task data from the
|
||||
* database, evaluates conditions based on their attributes, and issues new tasks
|
||||
* to the ACS system. The method also handles specific locking and task dependency
|
||||
* scenarios, ensuring that all conditions for task issuance are met.
|
||||
*
|
||||
* Key logic includes:
|
||||
* - Querying database tables to fetch and analyze task details.
|
||||
* - Ensuring task limits are respected to prevent excessive task submissions.
|
||||
* - Checking and managing task statuses and related storage attributes, such as
|
||||
* lock states and box specifications.
|
||||
* - Notifying the ACS system with the correctly formatted task data.
|
||||
* - Handling errors and updating task remarks in case of exceptions or conflicting conditions.
|
||||
*
|
||||
* This method operates with various modules such as task management, box handling services,
|
||||
* and ACS system notification utilities.
|
||||
*/
|
||||
@SneakyThrows
|
||||
public void execute() {
|
||||
/*
|
||||
@@ -117,22 +87,12 @@ public class AutoIssueOutEmptyTask {
|
||||
if (浅Attr.getString("lock_type").equals(IOSEnum.LOCK_TYPE.code("未锁定"))) {
|
||||
// 判断浅货位木箱和深货位木箱是否相同规格
|
||||
outBoxManageService.createBoxMove(浅Attr);
|
||||
} else if (浅Attr.getString("lock_type").equals(IOSEnum.LOCK_TYPE.code("验箱出库锁"))) {
|
||||
List<SchBaseTask> list = ischBaseTaskService.list(new QueryWrapper<SchBaseTask>()
|
||||
.eq("is_delete", "0")
|
||||
.eq("point_code1", 浅Attr.getString("struct_code"))
|
||||
.lt("task_status", TaskStatusEnum.FINISHED.getCode()));
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
json.put("remark", "当前仓位对应的浅货位【" + 浅Attr.getString("struct_code") + "有正在执行中的任务,任务完成后才能下发!】");
|
||||
WQLObject.getWQLObject("SCH_BASE_Task").update(json);
|
||||
continue;
|
||||
} else {
|
||||
outBoxManageService.createBoxMove(浅Attr);
|
||||
}
|
||||
} else {
|
||||
json.put("remark", "当前仓位对应的浅货位【" + 浅Attr.getString("struct_code") + "有正在执行中的任务,任务完成后才能下发!】");
|
||||
WQLObject.getWQLObject("SCH_BASE_Task").update(json);
|
||||
continue;
|
||||
}
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
json.put("remark", e.getMessage());
|
||||
WQLObject.getWQLObject("SCH_BASE_Task").update(json);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user