fix:解决依赖问题
This commit is contained in:
@@ -209,6 +209,9 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (ObjectUtil.isEmpty(jsonHotIvt)) {
|
||||||
|
throw new BadRequestException("烘烤区没有合适温度的空位!");
|
||||||
|
}
|
||||||
// 2.创建暂存位 --> 烘烤区任务
|
// 2.创建暂存位 --> 烘烤区任务
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("type", "2"); // 1- 冷却区入烘箱 2- 暂存位入烘箱
|
param.put("type", "2"); // 1- 冷却区入烘箱 2- 暂存位入烘箱
|
||||||
@@ -218,7 +221,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
param.put("product_area", schBasePoint.getProduct_area());
|
param.put("product_area", schBasePoint.getProduct_area());
|
||||||
param.put("request_param", NumberUtil.mul(Double.parseDouble(hours), 60));
|
param.put("request_param", NumberUtil.mul(Double.parseDouble(hours), 60));
|
||||||
|
|
||||||
InHotTask inHotTask = new InHotTask();
|
InHotTask inHotTask = SpringContextHolder.getBean(InHotTask.class);
|
||||||
String task_id = inHotTask.createTask(param);
|
String task_id = inHotTask.createTask(param);
|
||||||
|
|
||||||
// 3.插入主表
|
// 3.插入主表
|
||||||
@@ -279,25 +282,24 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
//只找入箱点位
|
//只找入箱点位
|
||||||
map.put("point_type", "4");
|
map.put("point_type", "4");
|
||||||
|
|
||||||
String point_code2 = "";
|
|
||||||
List<SchBasePoint> point_code2_jo = schBasePointMapper.selectList(map);
|
List<SchBasePoint> point_code2_jo = schBasePointMapper.selectList(map);
|
||||||
if (ObjectUtil.isNotEmpty(point_code2_jo)) {
|
if (ObjectUtil.isEmpty(point_code2_jo)) {
|
||||||
point_code2 = point_code2_jo.get(0).getPoint_code();
|
throw new BadRequestException("未查询到可用的点位类型为入箱的烘箱对接位(可能被占用,请稍后再试)!");
|
||||||
}
|
}
|
||||||
|
|
||||||
String point_code3 = "";
|
String point_code3 = "";
|
||||||
SchBasePoint point = point_code2_jo.get(0);
|
SchBasePoint point = point_code2_jo.get(0);
|
||||||
HotPointIvt jsonHotIvt = getJsonObject(product_area, point, temperature);
|
HotPointIvt jsonHotIvt = getJsonObject(product_area, point, temperature);
|
||||||
if (ObjectUtil.isNotEmpty(jsonHotIvt)) {
|
if (ObjectUtil.isNotEmpty(jsonHotIvt)) {
|
||||||
point_code3 = jsonHotIvt.getPoint_code();
|
throw new BadRequestException("烘烤区没有合适温度的空位!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3.创建冷却区 --> 烘烤区任务
|
// 3.创建冷却区 --> 烘烤区任务
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("type", "1"); // 1- 冷却区入烘箱 2- 暂存位入烘箱
|
param.put("type", "1"); // 1- 冷却区入烘箱 2- 暂存位入烘箱
|
||||||
param.put("point_code1", point_code1);
|
param.put("point_code1", point_code1);
|
||||||
param.put("point_code2", point_code2);
|
param.put("point_code2", point_code2_jo.get(0).getPoint_code());
|
||||||
param.put("point_code3", point_code3);
|
param.put("point_code3", jsonHotIvt.getPoint_code());
|
||||||
param.put("material_code", container_name);
|
param.put("material_code", container_name);
|
||||||
param.put("product_area", product_area);
|
param.put("product_area", product_area);
|
||||||
param.put("request_param", NumberUtil.mul(Double.parseDouble(hours), 60));
|
param.put("request_param", NumberUtil.mul(Double.parseDouble(hours), 60));
|
||||||
@@ -305,7 +307,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
param.put("param", map);
|
param.put("param", map);
|
||||||
|
|
||||||
// 创建冷却区 --> 暂存位的任务
|
// 创建冷却区 --> 暂存位的任务
|
||||||
InHotTask inHotTask = new InHotTask();
|
InHotTask inHotTask = SpringContextHolder.getBean(InHotTask.class);
|
||||||
String task_id = inHotTask.createTask(param);
|
String task_id = inHotTask.createTask(param);
|
||||||
|
|
||||||
// 4.插入烘箱区出入主表
|
// 4.插入烘箱区出入主表
|
||||||
@@ -373,7 +375,8 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//查询该点位是否存在未完成的任务
|
//查询该点位是否存在未完成的任务
|
||||||
boolean have_task = new CutConveyorTask().isSingleTask(point_code1);
|
CutConveyorTask cutConveyorTask = SpringContextHolder.getBean(CutConveyorTask.class);
|
||||||
|
boolean have_task = cutConveyorTask.isSingleTask(point_code1);
|
||||||
if (have_task) {
|
if (have_task) {
|
||||||
throw new BadRequestException("该点位存在未完成的任务!");
|
throw new BadRequestException("该点位存在未完成的任务!");
|
||||||
}
|
}
|
||||||
@@ -601,7 +604,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
param.put("product_area", jsonPointZc.getProduct_area());
|
param.put("product_area", jsonPointZc.getProduct_area());
|
||||||
param.put("request_param", NumberUtil.mul(Double.parseDouble(hours), 60));
|
param.put("request_param", NumberUtil.mul(Double.parseDouble(hours), 60));
|
||||||
|
|
||||||
InHotTask inHotTask = new InHotTask();
|
InHotTask inHotTask = SpringContextHolder.getBean(InHotTask.class);
|
||||||
String task_id = inHotTask.createTask(param);
|
String task_id = inHotTask.createTask(param);
|
||||||
|
|
||||||
// 3.插入主表
|
// 3.插入主表
|
||||||
@@ -698,7 +701,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
param.put("param", map);
|
param.put("param", map);
|
||||||
|
|
||||||
// 创建冷却区 --> 暂存位的任务
|
// 创建冷却区 --> 暂存位的任务
|
||||||
InHotTask inHotTask = new InHotTask();
|
InHotTask inHotTask = SpringContextHolder.getBean(InHotTask.class);
|
||||||
String task_id = inHotTask.createTask(param);
|
String task_id = inHotTask.createTask(param);
|
||||||
|
|
||||||
// 4.插入烘箱区出入主表
|
// 4.插入烘箱区出入主表
|
||||||
@@ -1147,7 +1150,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
param.put("product_area", jsonPointZc.getProduct_area());
|
param.put("product_area", jsonPointZc.getProduct_area());
|
||||||
param.put("request_param", NumberUtil.mul(Double.parseDouble(hours), 60));
|
param.put("request_param", NumberUtil.mul(Double.parseDouble(hours), 60));
|
||||||
|
|
||||||
InHotTask inHotTask = new InHotTask();
|
InHotTask inHotTask = SpringContextHolder.getBean(InHotTask.class);
|
||||||
String task_id = inHotTask.createTask(param);
|
String task_id = inHotTask.createTask(param);
|
||||||
|
|
||||||
// 3.插入主表
|
// 3.插入主表
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
SELECT *
|
SELECT *
|
||||||
FROM sch_base_task
|
FROM sch_base_task
|
||||||
WHERE (point_code3 = ivt.point_code OR point_code1 = ivt.point_code OR point_code2 = ivt.point_code OR point_code4 = ivt.point_code)
|
WHERE (point_code3 = ivt.point_code OR point_code1 = ivt.point_code OR point_code2 = ivt.point_code OR point_code4 = ivt.point_code)
|
||||||
AND task_status <![CDATA[<]]>] '07'
|
AND task_status <![CDATA[<]]> '07'
|
||||||
AND is_delete = '0'
|
AND is_delete = '0'
|
||||||
)
|
)
|
||||||
<if test="param.product_area != null and param.product_area != ''">
|
<if test="param.product_area != null and param.product_area != ''">
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.nl.modules.common.exception.BadRequestException;
|
|||||||
import org.nl.modules.common.utils.RedisUtils;
|
import org.nl.modules.common.utils.RedisUtils;
|
||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.wms.sch.tasks.InHotTask;
|
import org.nl.wms.sch.tasks.InHotTask;
|
||||||
import org.redisson.api.RLock;
|
import org.redisson.api.RLock;
|
||||||
import org.redisson.api.RedissonClient;
|
import org.redisson.api.RedissonClient;
|
||||||
@@ -42,7 +43,7 @@ public class AutoInHotTask {
|
|||||||
try {
|
try {
|
||||||
if (tryLock) {
|
if (tryLock) {
|
||||||
List<SchBaseTask> tasks = taskService.list(new LambdaQueryWrapper<SchBaseTask>()
|
List<SchBaseTask> tasks = taskService.list(new LambdaQueryWrapper<SchBaseTask>()
|
||||||
.eq(SchBaseTask::getTask_type, "010201")
|
.eq(SchBaseTask::getTask_type, "010206")
|
||||||
.eq(SchBaseTask::getIs_delete, "0")
|
.eq(SchBaseTask::getIs_delete, "0")
|
||||||
.eq(SchBaseTask::getTask_status, TaskStatusEnum.SURE_START.getCode()));
|
.eq(SchBaseTask::getTask_status, TaskStatusEnum.SURE_START.getCode()));
|
||||||
for (SchBaseTask task : tasks) {
|
for (SchBaseTask task : tasks) {
|
||||||
@@ -87,7 +88,8 @@ public class AutoInHotTask {
|
|||||||
task.setRemark("-");
|
task.setRemark("-");
|
||||||
task.setUpdate_time(DateUtil.now());
|
task.setUpdate_time(DateUtil.now());
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
new InHotTask().immediateNotifyAcs(task.getTask_id());
|
InHotTask inHotTask = SpringContextHolder.getBean(InHotTask.class);
|
||||||
|
inHotTask.immediateNotifyAcs(task.getTask_id());
|
||||||
}
|
}
|
||||||
|
|
||||||
public JSONObject getJsonObject(String product_area, JSONObject point_code2_jo, String temperature) {
|
public JSONObject getJsonObject(String product_area, JSONObject point_code2_jo, String temperature) {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.wms.sch.tasks.InHotTask;
|
import org.nl.wms.sch.tasks.InHotTask;
|
||||||
import org.redisson.api.RLock;
|
import org.redisson.api.RLock;
|
||||||
import org.redisson.api.RedissonClient;
|
import org.redisson.api.RedissonClient;
|
||||||
@@ -50,7 +51,8 @@ public class AutoIntoHotCacheTask {
|
|||||||
log.info("烘箱对接位:{} 没找到暂存位!", task.getPoint_code1());
|
log.info("烘箱对接位:{} 没找到暂存位!", task.getPoint_code1());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new InHotTask().immediateNotifyAcs(task.getTask_id());
|
InHotTask inHotTask = SpringContextHolder.getBean(InHotTask.class);
|
||||||
|
inHotTask.immediateNotifyAcs(task.getTask_id());
|
||||||
|
|
||||||
task.setTask_status(TaskStatusEnum.START_AND_POINT.getCode());
|
task.setTask_status(TaskStatusEnum.START_AND_POINT.getCode());
|
||||||
task.setPoint_code2(cache_jo.getString("point_code"));
|
task.setPoint_code2(cache_jo.getString("point_code"));
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import org.nl.common.utils.SecurityUtils;
|
|||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.system.service.dict.dao.Dict;
|
import org.nl.system.service.dict.dao.Dict;
|
||||||
import org.nl.system.service.dict.dao.mapper.SysDictMapper;
|
import org.nl.system.service.dict.dao.mapper.SysDictMapper;
|
||||||
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
||||||
@@ -311,7 +312,7 @@ public class CoolCutTask extends AbstractAcsTask {
|
|||||||
coolPointIvtMapper.updateById(jsonCoolIvt);
|
coolPointIvtMapper.updateById(jsonCoolIvt);
|
||||||
|
|
||||||
//更新母卷状态
|
//更新母卷状态
|
||||||
RawfoilWorkOrder rawfoilWorkOrder = rawfoilWorkOrderMapper.selectOne(new LambdaQueryWrapper<RawfoilWorkOrder>().eq(RawfoilWorkOrder::getContainer_name, schBaseTask.getVehicle_code()));
|
RawfoilWorkOrder rawfoilWorkOrder = rawfoilWorkOrderMapper.selectOne(new LambdaQueryWrapper<RawfoilWorkOrder>().eq(RawfoilWorkOrder::getContainer_name, schBaseTask.getMaterial_code()));
|
||||||
rawfoilWorkOrder.setOrigin("3");
|
rawfoilWorkOrder.setOrigin("3");
|
||||||
rawfoilWorkOrder.setRoll_status("3");
|
rawfoilWorkOrder.setRoll_status("3");
|
||||||
rawfoilWorkOrder.setUpdate_optid(currentUserId);
|
rawfoilWorkOrder.setUpdate_optid(currentUserId);
|
||||||
@@ -337,6 +338,7 @@ public class CoolCutTask extends AbstractAcsTask {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public String createTask(JSONObject form) {
|
public String createTask(JSONObject form) {
|
||||||
WQLObject tab = WQLObject.getWQLObject("SCH_BASE_Task");
|
WQLObject tab = WQLObject.getWQLObject("SCH_BASE_Task");
|
||||||
|
CutConveyorTask cutConveyorTask = SpringContextHolder.getBean(CutConveyorTask.class);
|
||||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ public class InHotTask extends AbstractAcsTask {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public String createTask(JSONObject form) {
|
public String createTask(JSONObject form) {
|
||||||
|
|
||||||
CutConveyorTask cutConveyorTask = new CutConveyorTask();
|
CutConveyorTask cutConveyorTask = SpringContextHolder.getBean(CutConveyorTask.class);
|
||||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
@@ -293,17 +293,20 @@ public class InHotTask extends AbstractAcsTask {
|
|||||||
task.setTask_id(IdUtil.getSnowflake(1, 1).nextId() + "");
|
task.setTask_id(IdUtil.getSnowflake(1, 1).nextId() + "");
|
||||||
task.setTask_code(IdUtil.getSnowflake(1, 1).nextId() + "");
|
task.setTask_code(IdUtil.getSnowflake(1, 1).nextId() + "");
|
||||||
task.setTask_type("010201");
|
task.setTask_type("010201");
|
||||||
if (StrUtil.isNotEmpty(point_code2) && StrUtil.isNotEmpty(point_code3)) {
|
// if (StrUtil.isNotEmpty(point_code2) && StrUtil.isNotEmpty(point_code3)) {
|
||||||
|
// task.setTask_status(TaskStatusEnum.START_AND_POINT.getCode());
|
||||||
|
// task.setPoint_code2(form.getString("point_code2"));
|
||||||
|
// task.setPoint_code3(form.getString("point_code3"));
|
||||||
|
// } else {
|
||||||
|
// task.setTask_status(TaskStatusEnum.SURE_START.getCode());
|
||||||
|
// task.setPoint_code2("");
|
||||||
|
// task.setPoint_code3("");
|
||||||
|
// task.setRemark(form.toJSONString());
|
||||||
|
// }
|
||||||
task.setTask_status(TaskStatusEnum.START_AND_POINT.getCode());
|
task.setTask_status(TaskStatusEnum.START_AND_POINT.getCode());
|
||||||
|
task.setPoint_code1(form.getString("point_code1"));
|
||||||
task.setPoint_code2(form.getString("point_code2"));
|
task.setPoint_code2(form.getString("point_code2"));
|
||||||
task.setPoint_code3(form.getString("point_code3"));
|
task.setPoint_code3(form.getString("point_code3"));
|
||||||
} else {
|
|
||||||
task.setTask_status(TaskStatusEnum.SURE_START.getCode());
|
|
||||||
task.setPoint_code2("");
|
|
||||||
task.setPoint_code3("");
|
|
||||||
task.setRemark(form.toJSONString());
|
|
||||||
}
|
|
||||||
task.setPoint_code1(form.getString("point_code1"));
|
|
||||||
task.setProduct_area(form.getString("product_area"));
|
task.setProduct_area(form.getString("product_area"));
|
||||||
task.setRequest_param(form.getString("request_param"));
|
task.setRequest_param(form.getString("request_param"));
|
||||||
task.setSort_seq(BigDecimal.valueOf(1));
|
task.setSort_seq(BigDecimal.valueOf(1));
|
||||||
@@ -319,12 +322,16 @@ public class InHotTask extends AbstractAcsTask {
|
|||||||
} else {
|
} else {
|
||||||
task.setPriority(priority_jo.getValue());
|
task.setPriority(priority_jo.getValue());
|
||||||
}
|
}
|
||||||
|
if (StrUtil.isNotEmpty(form.getString("point_code3"))) {
|
||||||
task.setAcs_task_type("8");
|
task.setAcs_task_type("8");
|
||||||
|
}else {
|
||||||
|
task.setAcs_task_type("6");
|
||||||
|
}
|
||||||
schBaseTaskMapper.insert(task);
|
schBaseTaskMapper.insert(task);
|
||||||
task_id = task.getTask_id();
|
task_id = task.getTask_id();
|
||||||
if ("04".equals(task.getTask_status())) {
|
// if ("04".equals(task.getTask_status())) {
|
||||||
immediateNotifyAcs(task_id);
|
// immediateNotifyAcs(task_id);
|
||||||
}
|
// }
|
||||||
//更新对应点位库存为已裹膜
|
//更新对应点位库存为已裹膜
|
||||||
CoolPointIvt cool_ivt = coolPointIvtMapper.selectOne(new LambdaQueryWrapper<CoolPointIvt>().eq(CoolPointIvt::getFull_point_code, form.getString("point_code1")));
|
CoolPointIvt cool_ivt = coolPointIvtMapper.selectOne(new LambdaQueryWrapper<CoolPointIvt>().eq(CoolPointIvt::getFull_point_code, form.getString("point_code1")));
|
||||||
if (ObjectUtil.isEmpty(cool_ivt)) {
|
if (ObjectUtil.isEmpty(cool_ivt)) {
|
||||||
@@ -370,8 +377,8 @@ public class InHotTask extends AbstractAcsTask {
|
|||||||
task.setAcs_task_type("6");
|
task.setAcs_task_type("6");
|
||||||
schBaseTaskMapper.insert(task);
|
schBaseTaskMapper.insert(task);
|
||||||
task_id = task.getTask_id();
|
task_id = task.getTask_id();
|
||||||
immediateNotifyAcs(task_id);
|
|
||||||
}
|
}
|
||||||
|
immediateNotifyAcs(task_id);
|
||||||
return task_id;
|
return task_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user