rev 反馈lms agv信息
This commit is contained in:
@@ -39,6 +39,7 @@ import org.nl.acs.ext.wms.service.AcsToLiKuService;
|
||||
import org.nl.acs.ext.wms.service.WmsToAcsService;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
import org.nl.acs.opc.Device;
|
||||
import org.nl.acs.opc.DeviceAppService;
|
||||
import org.nl.acs.opc.DeviceExtraManageDto;
|
||||
@@ -919,13 +920,30 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
public Map<String, Object> queryDeviceInfo(JSONObject param) {
|
||||
log.info("queryDeviceInfo--------------:输入参数" + param.toString());
|
||||
String region_code = param.getString("region_code");
|
||||
if (StrUtil.isEmpty(region_code)) {
|
||||
throw new BadRequestException("区域编码不能为空");
|
||||
}
|
||||
// if (StrUtil.isEmpty(region_code)) {
|
||||
// throw new BadRequestException("区域编码不能为空");
|
||||
// }
|
||||
AgvNdcTwoDeviceDriver agvNdcTwoDeviceDriver;
|
||||
AgvNdcOneDeviceDriver agvNdcOneDeviceDriver;
|
||||
List<Device> devices = deviceAppService.findDevice(DeviceType.agv);
|
||||
JSONArray data = new JSONArray();
|
||||
if (StrUtil.isEmpty(region_code)) {
|
||||
if (ObjectUtil.isNotEmpty(devices)) {
|
||||
for (int i = 0; i < devices.size(); i++) {
|
||||
Device device = devices.get(i);
|
||||
Device agvDevice = deviceAppService.findDeviceByCode(device.getDevice_code());
|
||||
if (agvDevice.getDeviceDriver() instanceof DeviceStageMonitor) {
|
||||
DeviceStageMonitor deviceStageMonitor = (DeviceStageMonitor) agvDevice.getDeviceDriver();
|
||||
try {
|
||||
JSONObject jo = deviceStageMonitor.getDeviceStatusName();
|
||||
data.add(jo);
|
||||
} catch (Exception e) {
|
||||
log.error("反馈AGV信息失败:{}", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (ObjectUtil.isNotEmpty(devices)) {
|
||||
for (int i = 0; i < devices.size(); i++) {
|
||||
Device device = devices.get(i);
|
||||
@@ -946,6 +964,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
JSONObject resp = new JSONObject();
|
||||
resp.put("status", 200);
|
||||
resp.put("message", "操作成功");
|
||||
|
||||
@@ -13,11 +13,11 @@ spring:
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lzhl_one_wcs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||
username: ${DB_USER:root}
|
||||
# password: ${DB_PWD:P@ssw0rd}
|
||||
# password: ${DB_PWD:Root.123456}
|
||||
password: ${DB_PWD:123456}
|
||||
password: ${DB_PWD:password}
|
||||
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
|
||||
@@ -2,7 +2,7 @@ spring:
|
||||
freemarker:
|
||||
check-template-location: false
|
||||
profiles:
|
||||
active: dev
|
||||
active: prod
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
data:
|
||||
|
||||
Reference in New Issue
Block a user