add 增加压机叫料请求
This commit is contained in:
@@ -44,7 +44,10 @@ public enum RequestMethodEnum {
|
|||||||
|
|
||||||
apply_feedback_weight(17, "apply_feedback_weight", "反馈压机残留重量","0"),
|
apply_feedback_weight(17, "apply_feedback_weight", "反馈压机残留重量","0"),
|
||||||
|
|
||||||
apply_get_put_station(18, "apply_get_put_station", "反馈当前抓取放置位","0");
|
apply_get_put_station(18, "apply_get_put_station", "反馈当前抓取放置位","0"),
|
||||||
|
|
||||||
|
press_request_material(19, "pressRequestMaterial", "压机叫料","0");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//驱动索引
|
//驱动索引
|
||||||
|
|||||||
@@ -99,5 +99,12 @@ public interface StandardRequestMethod {
|
|||||||
throw new RuntimeException("未实现");
|
throw new RuntimeException("未实现");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 压机叫料
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public default boolean press_request_material() {
|
||||||
|
throw new RuntimeException("未实现");
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 反馈压机残留重量
|
* 反馈压机残留重量
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user