|
@ -339,6 +339,30 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 压机叫料 |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
public synchronized boolean press_request_material(){ |
|
|
|
|
|
ApplyTaskRequest request = new ApplyTaskRequest(); |
|
|
|
|
|
request.setDevice_code(this.getDevice_code()); |
|
|
|
|
|
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName()); |
|
|
|
|
|
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName())); |
|
|
|
|
|
request.setOrder_code(String.valueOf(order_No)); |
|
|
|
|
|
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)), ApplyTaskResponse.class); |
|
|
|
|
|
message = RequestMethodEnum.getName("pressRequestMaterial") + "pressRequestMaterial 接口请求LMS..."; |
|
|
|
|
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request))); |
|
|
|
|
|
|
|
|
|
|
|
if (resp.getCode() == 200) { |
|
|
|
|
|
this.writing(200); |
|
|
|
|
|
this.setRequireSucess(true); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.writing(400); |
|
|
|
|
|
message = RequestMethodEnum.getName("pressRequestMaterial") + "pressRequestMaterial 接口请求失败" + resp.getMessage(); |
|
|
|
|
|
this.setRequireSucess(true); |
|
|
|
|
|
} |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
/** |
|
|
/** |
|
|
* 反馈压机残留重量 |
|
|
* 反馈压机残留重量 |
|
|
*/ |
|
|
*/ |
|
|