add 大屏真实数据
This commit is contained in:
@@ -144,6 +144,9 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
this.setRequireSucess(false);
|
||||
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + " -> " + mode);
|
||||
if ("true".equals(this.getExtraValue().get("ignore_release_check"))) {
|
||||
acsToWmsService.deactivatePoint(this.device_code, mode != 0);
|
||||
}
|
||||
}
|
||||
if (move != last_move) {
|
||||
logServer.deviceItemValue(this.device_code, "move", String.valueOf(move));
|
||||
|
||||
@@ -184,4 +184,6 @@ public interface AcsToWmsService {
|
||||
HttpResponse fjNeed(JSONObject param);
|
||||
|
||||
void equipmentFailure(String deviceCode);
|
||||
|
||||
void deactivatePoint(String deviceCode, boolean isUsed);
|
||||
}
|
||||
|
||||
@@ -1183,4 +1183,31 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deactivatePoint(String deviceCode, boolean isUsed) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
String wmsurl = acsConfigService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("device_code", deviceCode);
|
||||
param.put("is_used", isUsed);
|
||||
log.info("deactivatePoint - 请求参数 {}", param);
|
||||
AddressDto addressDto = addressService.findByCode("deactivatePoint");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
try {
|
||||
HttpResponse response = HttpRequest
|
||||
.post(wmsurl + methods_url)
|
||||
.timeout(2000)
|
||||
.body(param.toJSONString())
|
||||
.execute();
|
||||
log.info("deactivatePoint - 响应参数 {}", response.body());
|
||||
} catch (Exception e) {
|
||||
log.error("deactivatePoint - 请求错误!", e);
|
||||
}
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user