rev:修改回库锁范围

This commit is contained in:
zhangzq
2023-11-27 14:30:43 +08:00
parent 8fe6902917
commit cf2b72496c
4 changed files with 24 additions and 25 deletions

View File

@@ -433,7 +433,7 @@ public class HandCleanOutIvtServiceImpl implements HandCleanOutIvtService {
throw new PdaRequestException("任务下发失败:" + result.getString("message"));
}
}
},"backstore"+point_code,2);
},"backstore",3);
JSONObject returnjo = new JSONObject();
returnjo.put("code", "1");

View File

@@ -881,6 +881,27 @@ public class HandPFOutIvtServiceImpl implements HandPFOutIvtService {
}else{
throw new PdaRequestException("分配货位并发锁获取失败,请稍后再试!");
}
//调用下发按钮
AbstractAcsTask intask = new InTask();
//调用ACS接受任务接口
WQLObject taskTable = WQLObject.getWQLObject("sch_base_task");
JSONObject taskObj = taskTable.query("vehicle_code='" + storagevehicle_code + "' and task_status='01' and is_delete ='0'").uniqueResult(0);
if (ObjectUtil.isEmpty(taskObj)) {
throw new PdaRequestException("托盘为【'" + storagevehicle_code + "'】指令未找到");
}
String taskdtl_id = taskObj.getString("taskdtl_id");
JSONObject result = intask.notifyAcs(taskObj.getString("taskdtl_id"));
if (ObjectUtil.isNotEmpty(result)) {
String status = result.getString("status");
if ("200".equals(status)) {
HashMap<String, String> mapnow = new HashMap<>();
mapnow.put("task_status", "02");
taskTable.update(mapnow, "taskdtl_id = '" + taskdtl_id + "'");
} else {
throw new PdaRequestException("任务下发失败:" + result.getString("message"));
}
}
} catch (Exception e) {
e.printStackTrace();
throw new PdaRequestException("逻辑分配错误:"+e.getMessage());
@@ -888,28 +909,6 @@ public class HandPFOutIvtServiceImpl implements HandPFOutIvtService {
lock.unlock();
}
//调用下发按钮
AbstractAcsTask intask = new InTask();
//调用ACS接受任务接口
WQLObject taskTable = WQLObject.getWQLObject("sch_base_task");
JSONObject taskObj = taskTable.query("vehicle_code='" + storagevehicle_code + "' and task_status='01' and is_delete ='0'").uniqueResult(0);
if (ObjectUtil.isEmpty(taskObj)) {
throw new PdaRequestException("托盘为【'" + storagevehicle_code + "'】指令未找到");
}
String taskdtl_id = taskObj.getString("taskdtl_id");
JSONObject result = intask.notifyAcs(taskObj.getString("taskdtl_id"));
if (ObjectUtil.isNotEmpty(result)) {
String status = result.getString("status");
if ("200".equals(status)) {
HashMap<String, String> mapnow = new HashMap<>();
mapnow.put("task_status", "02");
taskTable.update(mapnow, "taskdtl_id = '" + taskdtl_id + "'");
} else {
throw new PdaRequestException("任务下发失败:" + result.getString("message"));
}
}
JSONObject returnjo = new JSONObject();
returnjo.put("code", "1");
returnjo.put("desc", "回库成功!");

View File

@@ -35,7 +35,7 @@ public class RedissonUtils {
if (isLock){
process.accept(null);
} else {
throw new BadRequestException("The current business is being processed key:"+key);
throw new BadRequestException("当前业务正在执行:"+key+",稍后再试");
}
}finally {
if (isLock){

View File

@@ -22,7 +22,7 @@ spring:
client:
reactive:
#endpoints: 172.31.185.110:9200,172.31.154.9:9200 #内网
endpoints: 127.0.0.1:200 #外网
endpoints: 127.0.0.1:9200 #外网
# endpoints: http://10.1.3.90:9200 #外网
elasticsearch:
rest: