fix
This commit is contained in:
@@ -336,8 +336,8 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
put("device_code", device_code);
|
||||
}};
|
||||
|
||||
HttpResponse response = acsToWmsService.shipDeviceUpdate(param);
|
||||
if (response == null || response.getStatus() == 200) {
|
||||
JSONObject response = acsToWmsService.shipDeviceUpdate(param);
|
||||
if (response == null || 20000 == response.getIntValue("code")) {
|
||||
this.requiresShipDeviceUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,8 +268,8 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
put("device_code", device_code);
|
||||
}};
|
||||
|
||||
HttpResponse response = acsToWmsService.shipDeviceUpdate(param);
|
||||
if (response == null || response.getStatus() == 200) {
|
||||
JSONObject response = acsToWmsService.shipDeviceUpdate(param);
|
||||
if (response == null || 20000 == response.getIntValue("code")) {
|
||||
this.requiresShipDeviceUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,12 +339,9 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
|
||||
HttpResponse response = acsToWmsService.shipDeviceUpdate(param);
|
||||
if (response.getStatus() == HttpStatus.OK.value()) {
|
||||
JSONObject result = JSONObject.parseObject(response.body());
|
||||
if (ObjectUtil.isNotEmpty(result) && result.getIntValue("status") == HttpStatus.OK.value()) {
|
||||
JSONObject response = acsToWmsService.shipDeviceUpdate(param);
|
||||
if (20000 == response.getIntValue("code")) {
|
||||
this.requireSucess = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,12 +211,9 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
|
||||
HttpResponse response = acsToWmsService.shipDeviceUpdate(param);
|
||||
if (response.getStatus() == HttpStatus.OK.value()) {
|
||||
JSONObject result = JSONObject.parseObject(response.body());
|
||||
if (ObjectUtil.isNotEmpty(result) && result.getIntValue("status") == HttpStatus.OK.value()) {
|
||||
this.requireSucess = true;
|
||||
}
|
||||
JSONObject response = acsToWmsService.shipDeviceUpdate(param);
|
||||
if (20000 == response.getIntValue("code")) {
|
||||
this.requireSucess = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public interface AcsToWmsService {
|
||||
UpdateLKTaskResponse updateLKTaskRequest(UpdateLKTaskRequest updateLKTaskRequest);
|
||||
|
||||
// 输送线有货变成无货时向lms请求
|
||||
HttpResponse shipDeviceUpdate(JSONObject param);
|
||||
JSONObject shipDeviceUpdate(JSONObject param);
|
||||
|
||||
/**
|
||||
* 反馈AGV取放货状态
|
||||
|
||||
@@ -530,7 +530,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResponse shipDeviceUpdate(JSONObject param) {
|
||||
public JSONObject shipDeviceUpdate(JSONObject param) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||
@@ -538,12 +538,15 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
AddressDto addressDto = addressService.findByCode("shipDeviceUpdate");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String url = wmsUrl + methods_url;
|
||||
// log.info("feedAgvTaskStatus - 请求参数 {}", param);
|
||||
return HttpRequest
|
||||
.post(url)
|
||||
.body(param.toString())
|
||||
log.info("shipDeviceUpdate - 请求参数 {}", param);
|
||||
JSONArray ja = new JSONArray();
|
||||
ja.add(param);
|
||||
HttpResponse result=HttpRequest.post(url)
|
||||
.body(ja.toString())
|
||||
.basicAuth("INFOR","Aa123456@@!!")
|
||||
.execute();
|
||||
// log.info("feedAgvTaskStatus - 返回参数 {}", response.body());
|
||||
log.info("shipDeviceUpdate - 返回参数 {}", result.body());
|
||||
return JSONObject.parseObject(result.body());
|
||||
}
|
||||
} catch (Throwable ignored) {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ spring:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:bjsz_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:bjszacs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:123456}
|
||||
# 初始连接数
|
||||
|
||||
Reference in New Issue
Block a user