fix
This commit is contained in:
@@ -186,17 +186,19 @@ public class BaoshijianSiteDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
log.info("设备{}反馈收片任务完成", this.devicecode);
|
||||
this.writing("x6", 0);
|
||||
this.writing("x8", 0);
|
||||
} else if (x1 != last_x1 && x1 == 1 ) {
|
||||
} else if (x1 != last_x1 && x1 == 1 &&!in ) {
|
||||
in = true;
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
String device_code = this.devicecode + "DJW01";
|
||||
jsonObject.put("device_code", device_code);
|
||||
jsonObject.put("requestDate", new Date());
|
||||
jsonObject.put("requestNo", IdUtil.simpleUUID());
|
||||
jsonObject.put("request_method_code", "TBXMLTASK");
|
||||
jsonObject.put("request_method_code", "TBXMLTask");
|
||||
String result=acsToWmsService.applyTaskToWms(jsonObject);
|
||||
JSONObject res_jo = JSONObject.parseObject(result);
|
||||
if (res_jo.getString("status").equals("200")){
|
||||
this.writing("x6", 1);
|
||||
in=false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,7 +206,8 @@ public class BaoshijianSiteDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
log.info("设备{}反馈上空架完成", this.devicecode);
|
||||
this.writing("x5", 0);
|
||||
this.writing("x7", 0);
|
||||
} else if (x2 != last_x2 && x2 == 1) {
|
||||
} else if (x2 != last_x2 && x2 == 1 && !out) {
|
||||
out = true;
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
String device_code = this.devicecode + "DJW02";
|
||||
jsonObject.put("device_code", device_code);
|
||||
@@ -215,6 +218,7 @@ public class BaoshijianSiteDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
JSONObject res_jo = JSONObject.parseObject(result);
|
||||
if (res_jo.getString("status").equals("200")){
|
||||
this.writing("x5", 1);
|
||||
out=false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -569,6 +569,19 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
if (StrUtil.equals(shortPathsList.get(0).getType(), "1")) {
|
||||
NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
ndcAgvService.sendAgvInstToNDC(task.getAgv_system_type(), dto);
|
||||
}else if(StrUtil.equals(shortPathsList.get(0).getType(), "2")) {
|
||||
ZheDaAgvService zheDaAgvService = SpringContextHolder.getBean(ZheDaAgvService.class);
|
||||
HttpResponse result = zheDaAgvService.sendAgvInstToAgv(dto);
|
||||
if (!ObjectUtils.isEmpty(result)) {
|
||||
JSONObject jo = JSON.parseObject(result.body());
|
||||
if (jo.getInteger("status") != 200) {
|
||||
dto.setSend_status("2");
|
||||
} else {
|
||||
dto.setSend_status("1");
|
||||
}
|
||||
} else {
|
||||
dto.setSend_status("2");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
dto.setSend_status("2");
|
||||
@@ -1008,11 +1021,11 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
// } else {
|
||||
flag = true;
|
||||
// }
|
||||
// } else if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "3")
|
||||
// && !StrUtil.equals(entity.getSend_status(), "2")) {
|
||||
// XianGongAgvService xianGongAgvService = SpringContextHolder.getBean(XianGongAgvService.class);
|
||||
// xianGongAgvService.deleteXZAgvInst(entity.getInstruction_code());
|
||||
// flag = true;
|
||||
} else if (StrUtil.equals(entity.getInstruction_type(), "4")
|
||||
&& !StrUtil.equals(entity.getSend_status(), "2")) {
|
||||
ZheDaAgvService zheDaAgvService = SpringContextHolder.getBean(ZheDaAgvService.class);
|
||||
zheDaAgvService.deleteZDAgvInst(entity.getInstruction_code());
|
||||
flag = true;
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user