psh 1 year ago
parent
commit
c0454f6ae2
  1. 4
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java
  2. 4
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor_ckk/SiemensConveyorCkkDeviceDriver.java
  3. 7
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/StandardInspectSiteDeviceDriver.java
  4. 7
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/fold_disc_site/FoldDiscSiteDeviceDriver.java
  5. 2
      acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java
  6. 15
      acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java
  7. 2
      acs/nladmin-system/src/main/resources/config/application-prod.yml

4
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java

@ -336,8 +336,8 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
put("device_code", device_code); put("device_code", device_code);
}}; }};
HttpResponse response = acsToWmsService.shipDeviceUpdate(param); JSONObject response = acsToWmsService.shipDeviceUpdate(param);
if (response == null || response.getStatus() == 200) { if (response == null || 20000 == response.getIntValue("code")) {
this.requiresShipDeviceUpdate = true; this.requiresShipDeviceUpdate = true;
} }
} }

4
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor_ckk/SiemensConveyorCkkDeviceDriver.java

@ -268,8 +268,8 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
put("device_code", device_code); put("device_code", device_code);
}}; }};
HttpResponse response = acsToWmsService.shipDeviceUpdate(param); JSONObject response = acsToWmsService.shipDeviceUpdate(param);
if (response == null || response.getStatus() == 200) { if (response == null || 20000 == response.getIntValue("code")) {
this.requiresShipDeviceUpdate = true; this.requiresShipDeviceUpdate = true;
} }
} }

7
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/StandardInspectSiteDeviceDriver.java

@ -339,15 +339,12 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
} else { } else {
this.instruction_require_time = date; this.instruction_require_time = date;
HttpResponse response = acsToWmsService.shipDeviceUpdate(param); JSONObject response = acsToWmsService.shipDeviceUpdate(param);
if (response.getStatus() == HttpStatus.OK.value()) { if (20000 == response.getIntValue("code")) {
JSONObject result = JSONObject.parseObject(response.body());
if (ObjectUtil.isNotEmpty(result) && result.getIntValue("status") == HttpStatus.OK.value()) {
this.requireSucess = true; this.requireSucess = true;
} }
} }
} }
}
@Override @Override
public JSONObject getDeviceStatusName() { public JSONObject getDeviceStatusName() {

7
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/fold_disc_site/FoldDiscSiteDeviceDriver.java

@ -211,15 +211,12 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
} else { } else {
this.instruction_require_time = date; this.instruction_require_time = date;
HttpResponse response = acsToWmsService.shipDeviceUpdate(param); JSONObject response = acsToWmsService.shipDeviceUpdate(param);
if (response.getStatus() == HttpStatus.OK.value()) { if (20000 == response.getIntValue("code")) {
JSONObject result = JSONObject.parseObject(response.body());
if (ObjectUtil.isNotEmpty(result) && result.getIntValue("status") == HttpStatus.OK.value()) {
this.requireSucess = true; this.requireSucess = true;
} }
} }
} }
}
@Override @Override
public JSONObject getDeviceStatusName() throws Exception { public JSONObject getDeviceStatusName() throws Exception {

2
acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java

@ -105,7 +105,7 @@ public interface AcsToWmsService {
UpdateLKTaskResponse updateLKTaskRequest(UpdateLKTaskRequest updateLKTaskRequest); UpdateLKTaskResponse updateLKTaskRequest(UpdateLKTaskRequest updateLKTaskRequest);
// 输送线有货变成无货时向lms请求 // 输送线有货变成无货时向lms请求
HttpResponse shipDeviceUpdate(JSONObject param); JSONObject shipDeviceUpdate(JSONObject param);
/** /**
* 反馈AGV取放货状态 * 反馈AGV取放货状态

15
acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java

@ -530,7 +530,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
} }
@Override @Override
public HttpResponse shipDeviceUpdate(JSONObject param) { public JSONObject shipDeviceUpdate(JSONObject param) {
try { try {
MDC.put(log_file_type, log_type); MDC.put(log_file_type, log_type);
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) { if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
@ -538,12 +538,15 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
AddressDto addressDto = addressService.findByCode("shipDeviceUpdate"); AddressDto addressDto = addressService.findByCode("shipDeviceUpdate");
String methods_url = addressDto.getMethods_url(); String methods_url = addressDto.getMethods_url();
String url = wmsUrl + methods_url; String url = wmsUrl + methods_url;
// log.info("feedAgvTaskStatus - 请求参数 {}", param); log.info("shipDeviceUpdate - 请求参数 {}", param);
return HttpRequest JSONArray ja = new JSONArray();
.post(url) ja.add(param);
.body(param.toString()) HttpResponse result=HttpRequest.post(url)
.body(ja.toString())
.basicAuth("INFOR","Aa123456@@!!")
.execute(); .execute();
// log.info("feedAgvTaskStatus - 返回参数 {}", response.body()); log.info("shipDeviceUpdate - 返回参数 {}", result.body());
return JSONObject.parseObject(result.body());
} }
} catch (Throwable ignored) { } catch (Throwable ignored) {

2
acs/nladmin-system/src/main/resources/config/application-prod.yml

@ -11,7 +11,7 @@ spring:
druid: druid:
db-type: com.alibaba.druid.pool.DruidDataSource db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy 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} username: ${DB_USER:root}
password: ${DB_PWD:123456} password: ${DB_PWD:123456}
# 初始连接数 # 初始连接数

Loading…
Cancel
Save