opt:套件优化

This commit is contained in:
2026-02-25 10:22:12 +08:00
parent 36ad0e2b9f
commit 88c3d7ae13
5 changed files with 137 additions and 3 deletions

View File

@@ -53,6 +53,7 @@ public class StorageCellServiceImpl implements StorageCellService , ApplicationA
String storage_code = MapUtil.getStr(whereJson, "storage_code");
String parent_storage_code = MapUtil.getStr(whereJson, "parent_storage_code");
String address = MapUtil.getStr(whereJson, "address");
String address1 = MapUtil.getStr(whereJson, "address1");
String where = "";
if (StrUtil.isNotEmpty(storage_code)) {
where += " and storage_code like '%" + storage_code + "%'";
@@ -63,6 +64,9 @@ public class StorageCellServiceImpl implements StorageCellService , ApplicationA
if (StrUtil.isNotEmpty(address)) {
where += " and address like '%" + address + "%'";
}
if (StrUtil.isNotEmpty(address1)) {
where += " and address1 like '%" + address1 + "%'";
}
WQLObject wo = WQLObject.getWQLObject("acs_storage_cell");
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "1 = 1 " + where, "update_time desc");
final JSONObject json = rb.pageResult();

View File

@@ -13,6 +13,8 @@ import net.dreamlu.mica.core.utils.StringUtil;
import org.apache.commons.lang3.ObjectUtils;
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
import org.nl.acs.device.service.DeviceService;
import org.nl.acs.device.service.dto.StorageCellDto;
import org.nl.acs.device.service.impl.StorageCellServiceImpl;
import org.nl.acs.device_driver.DeviceDriver;
import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.basedriver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
@@ -167,6 +169,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
TaskDto task = taskService.findByCode(instruction.getTask_code());
if ((StrUtil.startWith(task.getTask_code(), "-"))) {
log.info("定点任务下发agv允许取货信号");
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getStart_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress());
instruction.setOffSetName(instruction.getStart_point_code());
HttpResponse result = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result) || result.getStatus() != 200) {
return;
@@ -190,6 +199,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
JSONObject response = JSONObject.parseObject(result.body());
int responseCode = response.getInteger("responseCode");
if (responseCode == 0) {
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getStart_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress());
instruction.setOffSetName(instruction.getStart_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;
@@ -236,6 +252,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getStart_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress());
instruction.setOffSetName(instruction.getStart_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;
@@ -254,6 +277,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} else if (ext_system.equals("2")) {
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getStart_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress());
instruction.setOffSetName(instruction.getStart_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;
@@ -282,6 +312,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
if ((StrUtil.startWith(task.getTask_code(), "-"))) {
log.info("定点任务下发agv允许取货信号");
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getStart_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress());
instruction.setOffSetName(instruction.getStart_point_code());
HttpResponse result = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result) || result.getStatus() != 200) {
return;
@@ -305,6 +342,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
JSONObject response = JSONObject.parseObject(result.body());
int responseCode = response.getInteger("responseCode");
if (responseCode == 0) {
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getStart_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress());
instruction.setOffSetName(instruction.getStart_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;
@@ -344,6 +388,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
int code = response2.getInteger("code");
if (code == 200) {
log.info("请求焊接线成功,申请取货完成 请求结果{}", code);
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getStart_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress());
instruction.setOffSetName(instruction.getStart_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;
@@ -369,6 +420,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
JSONObject response = JSONObject.parseObject(result.body());
int responseCode = response.getInteger("responseCode");
if (responseCode == 0) {
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getStart_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress());
instruction.setOffSetName(instruction.getStart_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;
@@ -391,6 +449,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
TaskDto task = taskService.findByCode(instruction.getTask_code());
if ((StrUtil.startWith(task.getTask_code(), "-"))) {
log.info("定点任务下发agv允许取货信号");
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getNext_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress1());
instruction.setOffSetName(instruction.getNext_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;
@@ -414,6 +479,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
JSONObject response = JSONObject.parseObject(result.body());
int responseCode = response.getInteger("responseCode");
if (responseCode == 0) {
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getNext_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress1());
instruction.setOffSetName(instruction.getNext_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;
@@ -442,6 +514,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
int code = response.getInteger("code");
if (code == 200) {
log.info("请求焊接线放货成功,申请取货 请求结果{}", code);
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getNext_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress1());
instruction.setOffSetName(instruction.getNext_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;
@@ -455,6 +534,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
return;
}
} else if (ext_system.equals("2")) {
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getNext_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress1());
instruction.setOffSetName(instruction.getNext_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;
@@ -476,6 +562,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
TaskDto task = taskService.findByCode(instruction.getTask_code());
if ((StrUtil.startWith(task.getTask_code(), "-"))) {
log.info("定点任务下发agv允许取货信号");
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getNext_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress1());
instruction.setOffSetName(instruction.getNext_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;
@@ -499,6 +592,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
JSONObject response = JSONObject.parseObject(result.body());
int responseCode = response.getInteger("responseCode");
if (responseCode == 0) {
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getNext_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress1());
instruction.setOffSetName(instruction.getNext_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;
@@ -537,6 +637,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
int code = response2.getInteger("code");
if (code == 200) {
log.info("请求焊接线放货货完成成功,请求结果{}", code);
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getNext_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress1());
instruction.setOffSetName(instruction.getNext_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;
@@ -564,6 +671,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
JSONObject response = JSONObject.parseObject(result.body());
int responseCode = response.getInteger("responseCode");
if (responseCode == 0) {
StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getNext_point_code());
if (dto == null) {
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress1());
instruction.setOffSetName(instruction.getNext_point_code());
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
if (ObjectUtils.isEmpty(result1) || result1.getStatus() != 200) {
return;

View File

@@ -223,7 +223,7 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress());
instruction.setOffSet(dto.getAddress1());
instruction.setOffSetName(instruction.getNext_point_code());
device = deviceAppService.findDeviceByCode(this.devicecode);
HttpResponse result = acsToNDCService.genAgvSchedulingTask(instruction, 10);
@@ -244,7 +244,7 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
return;
}
instruction.setOffSet(dto.getAddress());
instruction.setOffSet(dto.getAddress1());
instruction.setOffSetName(instruction.getNext_point_code());
if ((StrUtil.startWith(task.getTask_code(), "-"))) {
log.info("定点任务下发agv允许取货信号");

View File

@@ -52,7 +52,7 @@ public class AcsToNDCServiceImpl implements AcsToNDCService {
ja.put("taskId", Integer.valueOf(instruction.getInstruction_code()));
DeviceService deviceService = SpringContextHolder.getBean(DeviceServiceImpl.class);
int startAddress = deviceService.queryAddressBydeviceCode(instruction.getStart_point_code());
int nextAddress = deviceService.queryAddressBydeviceCode(instruction.getNext_point_code());
int nextAddress = deviceService.queryAddressBynextdeviceCode(instruction.getNext_point_code());
ja.put("pickId", startAddress);
ja.put("pickName", instruction.getStart_point_code());
ja.put("releaseId", nextAddress);

View File

@@ -12,6 +12,22 @@
style="width: 200px;"
class="filter-item"
/>
<el-input
v-model="query.address"
size="small"
clearable
placeholder="输入取货地址"
style="width: 200px;"
class="filter-item"
/>
<el-input
v-model="query.address1"
size="small"
clearable
placeholder="输入放货地址"
style="width: 200px;"
class="filter-item"
/>
<rrOperation />
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->