FIX
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.nl.start.auto.run;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -271,7 +272,8 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
jsonObject.put("product_code", standardInspectSiteSmartDeviceDriver.getProduct_code());
|
||||
jsonObject.put("batch_code", standardInspectSiteSmartDeviceDriver.getBatch_code());
|
||||
jsonObject.put("product_specifications", standardInspectSiteSmartDeviceDriver.getProduct_specifications());
|
||||
jsonObject.put("time", standardInspectSiteSmartDeviceDriver.getTime());
|
||||
// jsonObject.put("time", standardInspectSiteSmartDeviceDriver.getTime());
|
||||
jsonObject.put("time", DateUtil.formatDate(new Date()));
|
||||
jsonObject.put("type", "9");
|
||||
acsToWmsService.lnshApplyTaskToWms(jsonObject);
|
||||
}
|
||||
@@ -336,23 +338,35 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
flag = true;
|
||||
|
||||
}
|
||||
// 检验取放货条件
|
||||
JSONObject agv_check = device_extra_table
|
||||
.query("is_delete = '0' AND extra_code = 'agv_check' AND device_code = '" + device.getDevice_code() + "'")
|
||||
.uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(agv_check) && "true".equals(agv_check.getString("extra_value"))) {
|
||||
JSONObject agv_check_status = device_extra_table
|
||||
.query("is_delete = '0' AND extra_code = 'agv_check_status' AND device_code = '" + device.getDevice_code() + "'")
|
||||
.uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(agv_check_status) && "1".equals(agv_check_status.getString("extra_value"))) {
|
||||
inst.setExecute_status("1");
|
||||
instructionService.update(inst);
|
||||
data = AgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
flag = true;
|
||||
agv_check_status.put("extra_value", "0");
|
||||
device_extra_table.update(agv_check_status);
|
||||
} else {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "AGV请求取货设备{}未取盖确认,无法反馈");
|
||||
//检测站点smart200
|
||||
//混料机进入前判断气缸是否已经抬起且已经取盖,否则不发下请求放货动作
|
||||
if (device.getDeviceDriver() instanceof StandardInspectSiteSmartDeviceDriver) {
|
||||
standardInspectSiteSmartDeviceDriver = (StandardInspectSiteSmartDeviceDriver) device.getDeviceDriver();
|
||||
log.info("flag:" + standardInspectSiteSmartDeviceDriver.getFlag());
|
||||
log.info("time:" + standardInspectSiteSmartDeviceDriver.getTime());
|
||||
log.info("Product_code:" + standardInspectSiteSmartDeviceDriver.getProduct_code());
|
||||
log.info("Product_specifications:" + standardInspectSiteSmartDeviceDriver.getProduct_specifications());
|
||||
log.info("Weight:" + standardInspectSiteSmartDeviceDriver.getWeight());
|
||||
if (1 == standardInspectSiteSmartDeviceDriver.getFlag()) {
|
||||
// 检验取放货条件
|
||||
JSONObject agv_check = device_extra_table
|
||||
.query("is_delete = '0' AND extra_code = 'agv_check' AND device_code = '" + device.getDevice_code() + "'")
|
||||
.uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(agv_check) && "true".equals(agv_check.getString("extra_value"))) {
|
||||
JSONObject agv_check_status = device_extra_table
|
||||
.query("is_delete = '0' AND extra_code = 'agv_check_status' AND device_code = '" + device.getDevice_code() + "'")
|
||||
.uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(agv_check_status) && "1".equals(agv_check_status.getString("extra_value"))) {
|
||||
inst.setExecute_status("1");
|
||||
instructionService.update(inst);
|
||||
data = AgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
flag = true;
|
||||
agv_check_status.put("extra_value", "0");
|
||||
device_extra_table.update(agv_check_status);
|
||||
} else {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "AGV请求取货设备{}未取盖确认,无法反馈");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user