Merge remote-tracking branch 'origin/master'

This commit is contained in:
2024-01-17 20:37:06 +08:00
6 changed files with 45 additions and 28 deletions

View File

@@ -397,7 +397,12 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
try { try {
this.checkcontrol(itemMap); this.checkcontrol(itemMap);
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); try {
Thread.sleep(1000);
this.checkcontrol(itemMap);
} catch (Exception ex) {
throw new RuntimeException(ex);
}
} }
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap); logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
} }

View File

@@ -161,6 +161,11 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
pullingSucess(); pullingSucess();
} }
break; break;
case 7:
if (task1 > 0 && !requireSucess) {
deliveryCompleted();
}
break;
default: default:
break; break;
@@ -174,6 +179,28 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
last_to_command = to_command; last_to_command = to_command;
} }
/**
* 取货完成
*/
private void deliveryCompleted() {
ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest();
applyManipulatorActionRequest.setAction("1");
applyManipulatorActionRequest.setTask_code1(String.valueOf(task1));
ApplyManipulatorActionResponse applyManipulatorActionResponse = acsToWmsService.actionFinishRequest(applyManipulatorActionRequest);
if (applyManipulatorActionResponse.getstatus() == 200) {
logServer.deviceExecuteLog(this.device_code, "", "", "插拔机取货完成,请求成功响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", 7);
this.writing(map);
requireSucess = true;
message = "缓存库放货成功";
} else {
requireSucess = false;
logServer.deviceExecuteLog(this.device_code, "", "", "插拔机取货完成,请求失败响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
message = "缓存库放货失败";
}
}
private synchronized void pullingSucess() { private synchronized void pullingSucess() {
List list = new ArrayList(); List list = new ArrayList();
ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest(); ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest();

View File

@@ -65,10 +65,10 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
int last_move1 = 0; int last_move1 = 0;
Integer move2 = 0; Integer move2 = 0;
Integer last_move2 = 0; Integer last_move2 = 0;
float qty1 = 0f; Float qty1 = 0f;
float last_qty1 = 0f; Float last_qty1 = 0f;
float qty2 = 0f; Float qty2 = 0f;
float last_qty2 = 0f; Float last_qty2 = 0f;
int task = 0; int task = 0;
int last_task = 0; int last_task = 0;
@@ -117,14 +117,14 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
if(!move2.equals(last_move2)){ if(!move2.equals(last_move2)){
logServer.deviceExecuteLog(this.device_code, "", "", "信号move2" + last_move2 + "->" + move2); logServer.deviceExecuteLog(this.device_code, "", "", "信号move2" + last_move2 + "->" + move2);
} }
if(qty1 != last_qty1){ if(!qty1.equals(last_qty1)){
logServer.deviceExecuteLog(this.device_code, "", "", "信号move2" + last_qty1 + "->" + qty1); logServer.deviceExecuteLog(this.device_code, "", "", "信号qty1" + last_qty1 + "->" + qty1);
} }
if(qty2 != last_qty2){ if(!qty2.equals(last_qty2)){
logServer.deviceExecuteLog(this.device_code, "", "", "信号move2" + last_qty2 + "->" + qty2); logServer.deviceExecuteLog(this.device_code, "", "", "信号qty2" + last_qty2 + "->" + qty2);
} }
if(task != last_task){ if(task != last_task){
logServer.deviceExecuteLog(this.device_code, "", "", "信号move2" + last_task + "->" + task); logServer.deviceExecuteLog(this.device_code, "", "", "信号task" + last_task + "->" + task);
} }
@@ -162,7 +162,7 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
} }
break; break;
case 5: case 5:
if (task > 0 && !requireSucess && (qty1 > 0 || qty2 > 0)) { if (task > 0 && !requireSucess) {
manualFeedbackQty(); manualFeedbackQty();
} }
break; break;

View File

@@ -599,13 +599,7 @@ export default {
device_code: '', device_code: '',
material_code: '', material_code: '',
qty: '' qty: ''
}/* , }]
{
device_code: '',
material_code: '',
qty: ''
} */
]
}, },
rules: { rules: {
start_height: [ start_height: [

View File

@@ -1318,7 +1318,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
JSONObject point1_jo = ivt_shaftivt.query("point_code = '" + task_jo.getString("point_code1") + "'").uniqueResult(0); JSONObject point1_jo = ivt_shaftivt.query("point_code = '" + task_jo.getString("point_code1") + "'").uniqueResult(0);
point1_jo.put("have_qzz", "0"); point1_jo.put("have_qzz", "0");
ivt_shaftivt.update(point1_jo); ivt_shaftivt.update(point1_jo);
} else if ("010607".equals(point_type)) { } else if ("010607".equals(point_type) || "010603".equals(point_type)) {
JSONObject point1_jo = ivt_shaftivt.query("point_code = '" + task_jo.getString("point_code1") + "'").uniqueResult(0); JSONObject point1_jo = ivt_shaftivt.query("point_code = '" + task_jo.getString("point_code1") + "'").uniqueResult(0);
point1_jo.put("qzz_size", ""); point1_jo.put("qzz_size", "");
point1_jo.put("qzz_generation", ""); point1_jo.put("qzz_generation", "");

View File

@@ -108,15 +108,6 @@ public class PaperTrussTask extends AbstractAcsTask {
goal_point.put("have_qzz", "1"); goal_point.put("have_qzz", "1");
ivt_shaftivt.update(goal_point); ivt_shaftivt.update(goal_point);
} }
//空轴放货任务
if ("010603".equals(task_type)) {
String point_code = task_jo.getString("point_code1");
JSONObject goal_point = ivt_shaftivt.query("point_code = '" + point_code + "'").uniqueResult(0);
goal_point.put("qzz_size", "");
goal_point.put("qzz_generation", "");
goal_point.put("have_qzz", "0");
ivt_shaftivt.update(goal_point);
}
//空轴换货任务 //空轴换货任务
if ("010604".equals(task_type)) { if ("010604".equals(task_type)) {
String point_code = task_jo.getString("point_code1"); String point_code = task_jo.getString("point_code1");