add:对烘箱对接位添加允许强制进入功能
This commit is contained in:
@@ -720,6 +720,7 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
|||||||
String vehicle_code = form.getString("vehicle_code");
|
String vehicle_code = form.getString("vehicle_code");
|
||||||
String islock = form.getString("islock");
|
String islock = form.getString("islock");
|
||||||
String requireSucess = form.getString("requireSucess");
|
String requireSucess = form.getString("requireSucess");
|
||||||
|
String is_force = form.getString("is_force");
|
||||||
String fullrequireSucess = form.getString("fullrequireSucess");
|
String fullrequireSucess = form.getString("fullrequireSucess");
|
||||||
if (device_code.indexOf(".") != -1) {
|
if (device_code.indexOf(".") != -1) {
|
||||||
device_code = device_code.substring(0, device_code.indexOf("."));
|
device_code = device_code.substring(0, device_code.indexOf("."));
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
//普通-光电检测
|
//普通-光电检测
|
||||||
PhotoelectricInspectionSiteDeviceDriver photoelectricInspectionSiteDeviceDriver;
|
PhotoelectricInspectionSiteDeviceDriver photoelectricInspectionSiteDeviceDriver;
|
||||||
//标准-光电检测
|
//标准-光电检测
|
||||||
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
|
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver = null;
|
||||||
//自动门
|
//自动门
|
||||||
StandardAutodoorDeviceDriver standardAutodoorDeviceDriver;
|
StandardAutodoorDeviceDriver standardAutodoorDeviceDriver;
|
||||||
|
|
||||||
@@ -237,8 +237,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||||
standardInspectSiteDeviceDriver.writing("to_command", "1");
|
try {
|
||||||
if (standardInspectSiteDeviceDriver.getMove() == 1 && standardInspectSiteDeviceDriver.getAction() == 1) {
|
standardInspectSiteDeviceDriver.writing("to_command", "1");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((standardInspectSiteDeviceDriver.getMove() == 1 && standardInspectSiteDeviceDriver.getAction() == 1 )|| standardInspectSiteDeviceDriver.getIs_force()==1 ) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + ",指令号:" + ikey +"不满足取货条件";
|
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + ",指令号:" + ikey +"不满足取货条件";
|
||||||
@@ -247,7 +252,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} else {
|
} else {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
}
|
}
|
||||||
|
standardInspectSiteDeviceDriver.setIs_force(0);
|
||||||
}
|
}
|
||||||
// 取货完毕
|
// 取货完毕
|
||||||
//(Itype=1/2/3,需要WCS反馈Phase)
|
//(Itype=1/2/3,需要WCS反馈Phase)
|
||||||
@@ -305,12 +310,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||||
standardInspectSiteDeviceDriver.writing("to_command", "0");
|
standardInspectSiteDeviceDriver.writing("to_command", "0");
|
||||||
if (standardInspectSiteDeviceDriver.getMove() == 0) {
|
if (standardInspectSiteDeviceDriver.getMove() == 0|| standardInspectSiteDeviceDriver.getIs_force()==1) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + ",指令号:" + ikey + "不满足取货条件";
|
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + ",指令号:" + ikey + "不满足取货条件";
|
||||||
log.info("设备{}当前光电信号{},动作信号{},不满足取货条件", device_code, standardInspectSiteDeviceDriver.getMove());
|
log.info("设备{}当前光电信号{},动作信号{},不满足取货条件", device_code, standardInspectSiteDeviceDriver.getMove());
|
||||||
}
|
}
|
||||||
|
standardInspectSiteDeviceDriver.setIs_force(0);
|
||||||
} else {
|
} else {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
}
|
}
|
||||||
@@ -500,12 +506,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||||
standardInspectSiteDeviceDriver.writing("to_command", "1");
|
standardInspectSiteDeviceDriver.writing("to_command", "1");
|
||||||
if (standardInspectSiteDeviceDriver.getMove() == 0 && standardInspectSiteDeviceDriver.getAction() == 1) {
|
if ((standardInspectSiteDeviceDriver.getMove() == 0 && standardInspectSiteDeviceDriver.getAction() == 1)||standardInspectSiteDeviceDriver.getIs_force()==1) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
}
|
}
|
||||||
|
standardInspectSiteDeviceDriver.setIs_force(0);
|
||||||
}
|
}
|
||||||
//放货完成
|
//放货完成
|
||||||
//(Itype=1/2/3,需要WCS反馈)
|
//(Itype=1/2/3,需要WCS反馈)
|
||||||
@@ -561,12 +568,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||||
standardInspectSiteDeviceDriver.writing("to_command", "0");
|
standardInspectSiteDeviceDriver.writing("to_command", "0");
|
||||||
if (standardInspectSiteDeviceDriver.getMove() == 1) {
|
if ((standardInspectSiteDeviceDriver.getMove() == 1)||standardInspectSiteDeviceDriver.getIs_force()==1) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
}
|
}
|
||||||
|
standardInspectSiteDeviceDriver.setIs_force(0);
|
||||||
}
|
}
|
||||||
//到达放货点
|
//到达放货点
|
||||||
//(Itype=1、3,需要WCS反馈)
|
//(Itype=1、3,需要WCS反馈)
|
||||||
|
|||||||
@@ -986,7 +986,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
this.require_empty_in_time = date;
|
this.require_empty_in_time = date;
|
||||||
|
|
||||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||||
message = "申请空盘入库任务中...";
|
|
||||||
|
|
||||||
// if(taskserver.querySameOriginTask(this.device_code) > 0 ){
|
// if(taskserver.querySameOriginTask(this.device_code) > 0 ){
|
||||||
// message = "已存在空盘出库任务不再请求";
|
// message = "已存在空盘出库任务不再请求";
|
||||||
@@ -998,6 +997,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
apply.put("type", "2");
|
apply.put("type", "2");
|
||||||
String str = acsToWmsService.applyTaskToWms(apply);
|
String str = acsToWmsService.applyTaskToWms(apply);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请空盘入库,请求参数:" + apply);
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请空盘入库,请求参数:" + apply);
|
||||||
|
message = "申请空盘入库任务,请求参数:"+apply;
|
||||||
|
|
||||||
JSONObject jo = JSON.parseObject(str);
|
JSONObject jo = JSON.parseObject(str);
|
||||||
if (ObjectUtil.isEmpty(jo)) {
|
if (ObjectUtil.isEmpty(jo)) {
|
||||||
|
|||||||
@@ -113,6 +113,9 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
//申请物料
|
//申请物料
|
||||||
private Boolean apply_material = false;
|
private Boolean apply_material = false;
|
||||||
|
|
||||||
|
//是否强制 0否 1是
|
||||||
|
private int is_force = 0;
|
||||||
|
|
||||||
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
||||||
int flag;
|
int flag;
|
||||||
|
|
||||||
@@ -201,6 +204,8 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
String mode = "";
|
String mode = "";
|
||||||
String action = "";
|
String action = "";
|
||||||
String move = "";
|
String move = "";
|
||||||
|
String is_force = "";
|
||||||
|
|
||||||
if (this.getMode() == 0) {
|
if (this.getMode() == 0) {
|
||||||
mode = "未联机";
|
mode = "未联机";
|
||||||
} else if (this.getMode() == 1) {
|
} else if (this.getMode() == 1) {
|
||||||
@@ -211,6 +216,12 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
mode = "运行中";
|
mode = "运行中";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.getIs_force() == 0) {
|
||||||
|
is_force = "正常";
|
||||||
|
} else if (this.getIs_force() == 1) {
|
||||||
|
is_force = "禁用";
|
||||||
|
}
|
||||||
|
|
||||||
if (this.getMove() == 0) {
|
if (this.getMove() == 0) {
|
||||||
move = "无货";
|
move = "无货";
|
||||||
jo.put("hasGoods", false);
|
jo.put("hasGoods", false);
|
||||||
@@ -229,11 +240,23 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
jo.put("error", this.getError());
|
jo.put("error", this.getError());
|
||||||
jo.put("isError", this.getIserror());
|
jo.put("isError", this.getIserror());
|
||||||
jo.put("task", this.getTask());
|
jo.put("task", this.getTask());
|
||||||
|
jo.put("is_click", true);
|
||||||
|
jo.put("is_force", this.getIs_force());
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setDeviceStatus(JSONObject data) {
|
public void setDeviceStatus(JSONObject data) {
|
||||||
|
String is_force = data.getString("is_force");
|
||||||
|
if (StrUtil.isNotEmpty(is_force)) {
|
||||||
|
this.setIs_force(Integer.parseInt(is_force));
|
||||||
|
}
|
||||||
|
String requestSucess = data.getString("requireSucess");
|
||||||
|
if (StrUtil.equals(requestSucess, "0")) {
|
||||||
|
this.requireSucess = false;
|
||||||
|
} else if (StrUtil.equals(requestSucess, "1")) {
|
||||||
|
this.requireSucess = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
"url": "https://github.com/elunez/eladmin/issues"
|
"url": "https://github.com/elunez/eladmin/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@logicflow/core": "^1.1.22",
|
"@logicflow/core": "1.2.1",
|
||||||
"@logicflow/extension": "^1.1.22",
|
"@logicflow/extension": "1.2.1",
|
||||||
"@riophae/vue-treeselect": "0.4.0",
|
"@riophae/vue-treeselect": "0.4.0",
|
||||||
"af-table-column": "^1.0.3",
|
"af-table-column": "^1.0.3",
|
||||||
"ansi_up": "^5.1.0",
|
"ansi_up": "^5.1.0",
|
||||||
|
|||||||
@@ -137,6 +137,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog title="设备设置" :visible.sync="dialogFormVisible8" 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="is_force" label-width="120px">
|
||||||
|
<el-radio-group v-model="form.is_force">
|
||||||
|
<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="dialogFormVisible8 = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="dialogSave">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog title="设备设置" :visible.sync="dialogFormVisible6" width="35%">
|
<el-dialog title="设备设置" :visible.sync="dialogFormVisible6" width="35%">
|
||||||
<el-form :model="form" size="small">
|
<el-form :model="form" size="small">
|
||||||
<el-form-item label="设备编号" prop="device_code" label-width="120px">
|
<el-form-item label="设备编号" prop="device_code" label-width="120px">
|
||||||
@@ -212,6 +230,7 @@ export default {
|
|||||||
dialogFormVisible5: false,
|
dialogFormVisible5: false,
|
||||||
dialogFormVisible6: false,
|
dialogFormVisible6: false,
|
||||||
dialogFormVisible7: false,
|
dialogFormVisible7: false,
|
||||||
|
dialogFormVisible8: false,
|
||||||
form: {
|
form: {
|
||||||
device_code: '',
|
device_code: '',
|
||||||
hasGoodStatus: null,
|
hasGoodStatus: null,
|
||||||
@@ -220,6 +239,7 @@ export default {
|
|||||||
suspended: null,
|
suspended: null,
|
||||||
material_type: '',
|
material_type: '',
|
||||||
requireSucess: '',
|
requireSucess: '',
|
||||||
|
is_force: '',
|
||||||
fullrequireSucess: '',
|
fullrequireSucess: '',
|
||||||
is_disable: '',
|
is_disable: '',
|
||||||
applySucess: ''
|
applySucess: ''
|
||||||
@@ -362,10 +382,12 @@ export default {
|
|||||||
this.dialogFormVisible7 = true
|
this.dialogFormVisible7 = true
|
||||||
} else if (clickObj.data.driver_type === 'siemens_conveyor_ckk') {
|
} else if (clickObj.data.driver_type === 'siemens_conveyor_ckk') {
|
||||||
this.dialogFormVisible7 = true
|
this.dialogFormVisible7 = true
|
||||||
|
} else if (clickObj.data.driver_type === 'standard_inspect_site') {
|
||||||
|
this.dialogFormVisible8 = true
|
||||||
} else if (clickObj.data.driver_type === 'standard_conveyor_control_with_scanner') {
|
} else if (clickObj.data.driver_type === 'standard_conveyor_control_with_scanner') {
|
||||||
this.dialogFormVisible6 = true
|
this.dialogFormVisible6 = true
|
||||||
} else {
|
} else {
|
||||||
this.dialogFormVisible = true
|
this.dialogFormVisible8 = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.form.angle = clickObj.angle
|
this.form.angle = clickObj.angle
|
||||||
@@ -374,6 +396,7 @@ export default {
|
|||||||
this.form.hasGoodStatus = clickObj.data.hasGoods
|
this.form.hasGoodStatus = clickObj.data.hasGoods
|
||||||
this.form.material_type = clickObj.data.material_type
|
this.form.material_type = clickObj.data.material_type
|
||||||
this.form.requireSucess = clickObj.data.requireSucess
|
this.form.requireSucess = clickObj.data.requireSucess
|
||||||
|
this.form.is_force = clickObj.data.is_force
|
||||||
this.form.fullrequireSucess = clickObj.data.fullrequireSucess
|
this.form.fullrequireSucess = clickObj.data.fullrequireSucess
|
||||||
this.form.is_disable = clickObj.data.is_disable1
|
this.form.is_disable = clickObj.data.is_disable1
|
||||||
this.form.applySucess = clickObj.data.applySucess
|
this.form.applySucess = clickObj.data.applySucess
|
||||||
@@ -560,6 +583,9 @@ export default {
|
|||||||
} else if (val === 'requireSucess') {
|
} else if (val === 'requireSucess') {
|
||||||
const obj = { name: '请求成功标记', value: data[val] }
|
const obj = { name: '请求成功标记', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
|
} else if (val === 'is_force') {
|
||||||
|
const obj = { name: '是否强制', value: data[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
} else if (val === 'applySucess') {
|
} else if (val === 'applySucess') {
|
||||||
const obj = { name: 'applySucess', value: data[val] }
|
const obj = { name: 'applySucess', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
@@ -657,6 +683,7 @@ export default {
|
|||||||
this.dialogFormVisible5 = false
|
this.dialogFormVisible5 = false
|
||||||
this.dialogFormVisible6 = false
|
this.dialogFormVisible6 = false
|
||||||
this.dialogFormVisible7 = false
|
this.dialogFormVisible7 = false
|
||||||
|
this.dialogFormVisible8 = false
|
||||||
this.initStageData()
|
this.initStageData()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
@@ -664,6 +691,7 @@ export default {
|
|||||||
this.dialogFormVisible4 = false
|
this.dialogFormVisible4 = false
|
||||||
this.dialogFormVisible5 = false
|
this.dialogFormVisible5 = false
|
||||||
this.dialogFormVisible7 = false
|
this.dialogFormVisible7 = false
|
||||||
|
this.dialogFormVisible8 = false
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user