更新
This commit is contained in:
@@ -953,6 +953,10 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
} else if (device.getDeviceDriver() instanceof SiemensConveyorCkkDeviceDriver) {
|
||||
SiemensConveyorCkkDeviceDriver siemensConveyorCkkDeviceDriver = (SiemensConveyorCkkDeviceDriver) device.getDeviceDriver();
|
||||
siemensConveyorCkkDeviceDriver.setDeviceStatus(form);
|
||||
} else if (device.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver){
|
||||
StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver
|
||||
= (StandardCoveyorControlWithScannerDeviceDriver) device.getDeviceDriver();
|
||||
standardCoveyorControlWithScannerDeviceDriver.setDeviceStatus(form);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
break;
|
||||
case 6:
|
||||
//空托盘满垛入库申请
|
||||
if (move > 0 && !requireEmptyInSuccess) {
|
||||
if (move > 0 && !requireSucess) {
|
||||
emptyIn();
|
||||
}
|
||||
if (move > 0 && !requireSucess) {
|
||||
@@ -867,13 +867,13 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
JSONObject jo = JSON.parseObject(str);
|
||||
if (ObjectUtil.isEmpty(jo)) {
|
||||
message = "申请空盘入库接口不通";
|
||||
requireEmptyInSuccess = true;
|
||||
requireSucess = true;
|
||||
} else {
|
||||
if (jo.getInteger("status") == 200) {
|
||||
message = "申请空盘入库成功";
|
||||
requireEmptyInSuccess = true;
|
||||
requireSucess = true;
|
||||
} else {
|
||||
requireEmptyInSuccess = true;
|
||||
requireSucess = true;
|
||||
message = "申请空盘入库失败," + jo.get("message").toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1470,6 +1470,12 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
is_disable = "禁用";
|
||||
}
|
||||
|
||||
String requireSucess = "0";
|
||||
if (this.requireSucess) {
|
||||
requireSucess = "1";
|
||||
}
|
||||
jo.put("requireSucess", requireSucess);
|
||||
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("status", status);
|
||||
@@ -1540,5 +1546,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
if (StrUtil.isNotEmpty(is_disable)) {
|
||||
this.setIs_disable(Integer.parseInt(is_disable));
|
||||
}
|
||||
String requestSucess = data.getString("requireSucess");
|
||||
if (StrUtil.equals(requestSucess, "0")) {
|
||||
this.requireSucess = false;
|
||||
} else if (StrUtil.equals(requestSucess, "1")) {
|
||||
this.requireSucess = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -853,7 +853,19 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
|
||||
@Override
|
||||
public void setDeviceStatus(JSONObject data) {
|
||||
|
||||
String requestSucess = data.getString("requireSucess");
|
||||
System.out.println(requestSucess);
|
||||
if (StrUtil.equals(requestSucess, "0")) {
|
||||
this.requireSucess = false;
|
||||
} else if (StrUtil.equals(requestSucess, "1")) {
|
||||
this.requireSucess = true;
|
||||
}
|
||||
String applySucess = data.getString("applySucess");
|
||||
if (StrUtil.equals(applySucess, "0")) {
|
||||
this.applySucess = false;
|
||||
} else if (StrUtil.equals(applySucess, "1")) {
|
||||
this.applySucess = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,16 +5,16 @@ import org.nl.acs.device_driver.DeviceDriver;
|
||||
|
||||
public interface ExecutableDeviceDriver extends DeviceDriver {
|
||||
default void executeAuto() {
|
||||
try {
|
||||
this.execute();
|
||||
} catch (Throwable var6) {
|
||||
String message = "线程调用异常:" + var6.getMessage();
|
||||
Log.error(message);
|
||||
} finally {
|
||||
}
|
||||
// try {
|
||||
// this.execute();
|
||||
// } catch (Throwable var6) {
|
||||
// String message = "线程调用异常:" + var6.getMessage();
|
||||
// Log.error(message);
|
||||
// } finally {
|
||||
// }
|
||||
this.execute();
|
||||
|
||||
}
|
||||
|
||||
void execute() throws Exception;
|
||||
void execute();
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@ spring:
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lzhl_one_wcs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
# password: ${DB_PWD:P@ssw0rd}
|
||||
# password: ${DB_PWD:Root.123456}
|
||||
password: ${DB_PWD:123456}
|
||||
password: ${DB_PWD:password}
|
||||
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
|
||||
@@ -2,7 +2,7 @@ spring:
|
||||
freemarker:
|
||||
check-template-location: false
|
||||
profiles:
|
||||
active: prod
|
||||
active: dev
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
data:
|
||||
|
||||
@@ -85,6 +85,12 @@
|
||||
<el-radio-button :label="1">禁用</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="请求标记" prop="requireSucess" label-width="120px">
|
||||
<el-radio-group v-model="form.requireSucess">
|
||||
<el-radio-button :label="0">否</el-radio-button>
|
||||
<el-radio-button :label="1">是</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible4 = false">取 消</el-button>
|
||||
@@ -103,7 +109,25 @@
|
||||
<el-radio-button :label="1">是</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="apply标记" prop="applySucess" label-width="120px">
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible5 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogSave">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="设备设置" :visible.sync="dialogFormVisible6" width="35%">
|
||||
<el-form :model="form" size="small">
|
||||
<el-form-item label="设备编号" prop="device_code" label-width="120px">
|
||||
<el-input v-model="form.device_code" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请指令标记" prop="requireSucess" label-width="120px">
|
||||
<el-radio-group v-model="form.requireSucess">
|
||||
<el-radio-button :label="0">否</el-radio-button>
|
||||
<el-radio-button :label="1">是</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="请求任务标记" prop="applySucess" label-width="120px">
|
||||
<el-radio-group v-model="form.applySucess">
|
||||
<el-radio-button :label="0">否</el-radio-button>
|
||||
<el-radio-button :label="1">是</el-radio-button>
|
||||
@@ -165,6 +189,7 @@ export default {
|
||||
dialogFormVisible3: false,
|
||||
dialogFormVisible4: false,
|
||||
dialogFormVisible5: false,
|
||||
dialogFormVisible6: false,
|
||||
form: {
|
||||
device_code: '',
|
||||
hasGoodStatus: null,
|
||||
@@ -308,7 +333,7 @@ export default {
|
||||
} else if (clickObj.data.driver_type === 'siemens_conveyor') {
|
||||
this.dialogFormVisible5 = true
|
||||
} else if (clickObj.data.driver_type === 'standard_conveyor_control_with_scanner') {
|
||||
this.dialogFormVisible5 = true
|
||||
this.dialogFormVisible6 = true
|
||||
} else {
|
||||
this.dialogFormVisible = true
|
||||
}
|
||||
@@ -538,6 +563,7 @@ export default {
|
||||
this.dialogFormVisible3 = false
|
||||
this.dialogFormVisible4 = false
|
||||
this.dialogFormVisible5 = false
|
||||
this.dialogFormVisible6 = false
|
||||
this.initStageData()
|
||||
}).catch(err => {
|
||||
this.dialogFormVisible = false
|
||||
|
||||
Reference in New Issue
Block a user