rev 取放货完成反馈电气信号
This commit is contained in:
@@ -245,9 +245,15 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService {
|
|||||||
JSONObject response=JSONObject.parseObject(result.body());
|
JSONObject response=JSONObject.parseObject(result.body());
|
||||||
int responseCode= response.getInteger("responseCode");
|
int responseCode= response.getInteger("responseCode");
|
||||||
if(responseCode == 0) {
|
if(responseCode == 0) {
|
||||||
is_feedback = true;
|
|
||||||
log.info("请求ZDwcs成功,取货完成 请求结果{}",responseCode);
|
log.info("请求ZDwcs成功,取货完成 请求结果{}",responseCode);
|
||||||
}
|
}
|
||||||
|
lubeiConveyorDeviceDriver.writing(2);
|
||||||
|
if(lubeiConveyorDeviceDriver.getTo_command() == 2){
|
||||||
|
is_feedback = true;
|
||||||
|
} else {
|
||||||
|
lubeiConveyorDeviceDriver.writing(2);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
log.info("设备{} 请求离开,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove());
|
log.info("设备{} 请求离开,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove());
|
||||||
}
|
}
|
||||||
@@ -353,9 +359,14 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService {
|
|||||||
JSONObject response=JSONObject.parseObject(result.body());
|
JSONObject response=JSONObject.parseObject(result.body());
|
||||||
int responseCode= response.getInteger("responseCode");
|
int responseCode= response.getInteger("responseCode");
|
||||||
if(responseCode == 0) {
|
if(responseCode == 0) {
|
||||||
is_feedback = true;
|
|
||||||
log.info("请求ZDwcs成功,放货完成 请求结果{}",responseCode);
|
log.info("请求ZDwcs成功,放货完成 请求结果{}",responseCode);
|
||||||
}
|
}
|
||||||
|
lubeiConveyorDeviceDriver.writing(3);
|
||||||
|
if(lubeiConveyorDeviceDriver.getTo_command() == 3){
|
||||||
|
is_feedback = true;
|
||||||
|
} else {
|
||||||
|
lubeiConveyorDeviceDriver.writing(3);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log.info("设备{} 请求离开,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove());
|
log.info("设备{} 请求离开,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ public class LubeiConveyorDeviceDriver extends AbstractOpcDeviceDriver implement
|
|||||||
int move = 0;
|
int move = 0;
|
||||||
int task = 0;
|
int task = 0;
|
||||||
int action=0;
|
int action=0;
|
||||||
|
int to_command = 0;
|
||||||
|
int last_to_command = 0;
|
||||||
int last_mode = 0;
|
int last_mode = 0;
|
||||||
int last_error = 0;
|
int last_error = 0;
|
||||||
int last_move = 0;
|
int last_move = 0;
|
||||||
@@ -144,7 +146,7 @@ public class LubeiConveyorDeviceDriver extends AbstractOpcDeviceDriver implement
|
|||||||
task = this.itemProtocol.getTask();
|
task = this.itemProtocol.getTask();
|
||||||
hasGoods = this.itemProtocol.getMove();
|
hasGoods = this.itemProtocol.getMove();
|
||||||
action =this.itemProtocol.getaction();
|
action =this.itemProtocol.getaction();
|
||||||
|
to_command = this.itemProtocol.getToCommand();
|
||||||
|
|
||||||
if (mode != last_mode) {
|
if (mode != last_mode) {
|
||||||
this.setRequireSucess(false);
|
this.setRequireSucess(false);
|
||||||
|
|||||||
@@ -700,37 +700,6 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
|||||||
if (StrUtil.equals(dto.getTask_status(), "0") || StrUtil.equals(dto.getTask_status(), "1")) {
|
if (StrUtil.equals(dto.getTask_status(), "0") || StrUtil.equals(dto.getTask_status(), "1")) {
|
||||||
tasks.add(dto);
|
tasks.add(dto);
|
||||||
}
|
}
|
||||||
// 判断是否为WMS下发的任务,如果是反馈任务状态给WMS
|
|
||||||
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue();
|
|
||||||
String Type1=entity.getTask_type();
|
|
||||||
if(StrUtil.equals(Type1,"定点任务")){
|
|
||||||
JSONObject jo = new JSONObject();
|
|
||||||
jo.put("taskCode",entity.getTask_code());
|
|
||||||
jo.put("carId","");
|
|
||||||
jo.put("taskType ",entity.getTask_type());
|
|
||||||
jo.put("feedbackStatus","taking");
|
|
||||||
log.info("请求参数:{}",jo);
|
|
||||||
HttpResponse result= acsToWmsZDService.taskFeedback(jo);
|
|
||||||
JSONObject response=JSONObject.parseObject(result.body());
|
|
||||||
int responseCode= response.getInteger("responseCode");
|
|
||||||
if(responseCode == 0) {
|
|
||||||
log.info("请求ZDwcs成功,申请取货 请求结果{}",responseCode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!StrUtil.startWith(dto.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
|
|
||||||
JSONObject jo = new JSONObject();
|
|
||||||
jo.put("taskCode",entity.getTask_code());
|
|
||||||
jo.put("carId","");
|
|
||||||
jo.put("taskType ",entity.getTask_type());
|
|
||||||
jo.put("feedbackStatus","taking");
|
|
||||||
log.info("请求参数:{}",jo);
|
|
||||||
HttpResponse result= acsToWmsZDService.taskFeedback(jo);
|
|
||||||
JSONObject response=JSONObject.parseObject(result.body());
|
|
||||||
int responseCode= response.getInteger("responseCode");
|
|
||||||
if(responseCode == 0) {
|
|
||||||
log.info("请求ZDwcs成功,申请取货 请求结果{}",responseCode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user