fix: 手持暂存下料修改
This commit is contained in:
@@ -965,17 +965,11 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject pdaSendSubVolumeToNBJ(JSONObject param) {
|
public JSONObject pdaSendSubVolumeToNBJ(JSONObject param) {
|
||||||
log.info("手持申请送子卷到内包间参数:{}", param);
|
log.info("手持申请送子卷到内包间参数:{}", param);
|
||||||
|
JSONObject res = new JSONObject();
|
||||||
|
res.put("status", HttpStatus.HTTP_OK);
|
||||||
|
res.put("message", "创建AGV任务成功!");
|
||||||
// param: point_code
|
// param: point_code
|
||||||
String pointCode = param.getString("point_code");
|
String pointCode = param.getString("point_code");
|
||||||
RLock open = redissonClient.getLock(pointCode);
|
|
||||||
boolean openLock;
|
|
||||||
try {
|
|
||||||
openLock = open.tryLock(0, TimeUnit.SECONDS);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
throw new BadRequestException("获取锁异常");
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (openLock) {
|
|
||||||
// 校验是否存在任务
|
// 校验是否存在任务
|
||||||
List<SchBaseTask> taskList = taskService.checkHaveTask(pointCode);
|
List<SchBaseTask> taskList = taskService.checkHaveTask(pointCode);
|
||||||
if (taskList.size() > 0) {
|
if (taskList.size() > 0) {
|
||||||
@@ -1021,17 +1015,6 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
throw new BadRequestException("系统繁忙,稍后在试!!");
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
if (openLock) {
|
|
||||||
open.unlock();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
JSONObject res = new JSONObject();
|
|
||||||
res.put("status", HttpStatus.HTTP_OK);
|
|
||||||
res.put("message", "创建AGV任务请求成功!");
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user