fix:现场测试,大屏显示修改
This commit is contained in:
@@ -23,7 +23,9 @@ import org.nl.acs.device.service.dto.*;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.DeviceDriverDefination;
|
||||
import org.nl.acs.device_driver.ScannerDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.indoor_manipulator.IndoorManipulatorDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.oven_manipulator.OvenGantryManipulatorDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.paper_tube_device2.PaperTubeConveyor2DeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.siemens_conveyor.SiemensConveyorDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.siemens_conveyor_ckk.SiemensConveyorCkkDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.siemens_conveyor_labeling.SiemensConveyorLabelingDeviceDriver;
|
||||
@@ -759,6 +761,14 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver
|
||||
= (StandardCoveyorControlWithScannerDeviceDriver) device.getDeviceDriver();
|
||||
standardCoveyorControlWithScannerDeviceDriver.setDeviceStatus(form);
|
||||
}else if (device.getDeviceDriver() instanceof IndoorManipulatorDeviceDriver){
|
||||
IndoorManipulatorDeviceDriver indoorManipulatorDeviceDriver
|
||||
= (IndoorManipulatorDeviceDriver) device.getDeviceDriver();
|
||||
indoorManipulatorDeviceDriver.setDeviceStatus(form);
|
||||
}else if (device.getDeviceDriver() instanceof PaperTubeConveyor2DeviceDriver){
|
||||
PaperTubeConveyor2DeviceDriver paperTubeConveyor2DeviceDriver
|
||||
= (PaperTubeConveyor2DeviceDriver) device.getDeviceDriver();
|
||||
paperTubeConveyor2DeviceDriver.setDeviceStatus(form);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -411,7 +411,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
} else if (this.getMode() == 1) {
|
||||
mode = "单机";
|
||||
} else if (this.getMode() == 2) {
|
||||
mode = "联机";
|
||||
mode = "联机";
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "运行中";
|
||||
} else if (this.getMode() == 4) {
|
||||
|
||||
@@ -501,6 +501,8 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
String to_new_getpoint = device.getExtraValue().get("address").toString();
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_command", 4);
|
||||
map.put("inflatableShaftVersion", applyManipulatorActionResponse.getVersion());
|
||||
|
||||
map.put("to_new_getpoint", Integer.parseInt(to_new_getpoint));
|
||||
this.writing(map);
|
||||
feedbackSucess = true;
|
||||
@@ -737,6 +739,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
jo.put("x", x_position);
|
||||
jo.put("y", y_position);
|
||||
jo.put("inflatable_shaft_size", this.inflatable_shaft_size);
|
||||
jo.put("driver_type", "station");
|
||||
return jo;
|
||||
}
|
||||
|
||||
@@ -750,95 +753,6 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
}
|
||||
}
|
||||
|
||||
public void checkcontrol(Map<String, Object> itemValues) throws JIException, AddFailedException {
|
||||
Group group = opcServerService.getServer(this.getOpcServer());
|
||||
Map<String, Object> write = new HashMap();
|
||||
Map<String, Item> readitems = new LinkedHashMap();
|
||||
List<String> itemsString = new ArrayList();
|
||||
itemsString = new ArrayList<> (itemValues.keySet());
|
||||
Iterator is = itemsString.iterator();
|
||||
|
||||
while (is.hasNext()) {
|
||||
String string = (String) is.next();
|
||||
try {
|
||||
readitems.put(string, group.addItem(string));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
int i = 0;
|
||||
while(true) {
|
||||
//下发信号
|
||||
try{
|
||||
if(i == 0){
|
||||
control( itemValues);
|
||||
} else {
|
||||
controlByNewConn( itemValues);
|
||||
}
|
||||
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
Map<String, Object> read = new HashMap();
|
||||
Map<Item, ItemState> itemStatus = null;
|
||||
boolean check = true;
|
||||
try{
|
||||
if(i>0){
|
||||
group = opcServerService.getServer(this.getOpcServer());
|
||||
itemsString = new ArrayList<> (itemValues.keySet());
|
||||
Iterator nis = itemsString.iterator();
|
||||
|
||||
while (nis.hasNext()) {
|
||||
String string = (String) nis.next();
|
||||
try {
|
||||
readitems.put(string, group.addItem(string));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
itemStatus = group.read(true, (Item[])readitems.values().toArray(new Item[0]));
|
||||
|
||||
} else {
|
||||
itemStatus = group.read(true, (Item[])readitems.values().toArray(new Item[0]));
|
||||
}
|
||||
Set<Item> items = itemStatus.keySet();
|
||||
Iterator var15 = items.iterator();
|
||||
while(var15.hasNext()) {
|
||||
Item item = (Item)var15.next();
|
||||
ItemState itemState = (ItemState)itemStatus.get(item);
|
||||
Object value = OpcUtl.getValue(item, itemState);
|
||||
read.put(item.getId(), value);
|
||||
}
|
||||
|
||||
Iterator var24 = itemsString.iterator();
|
||||
|
||||
while(var24.hasNext()) {
|
||||
String itemString = (String)var24.next();
|
||||
if (!ObjectUtl.isEquals(itemValues.get(itemString), JsonUtl.parse(read.get(itemString)))) {
|
||||
check = false;
|
||||
}
|
||||
}
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
check = false;
|
||||
}
|
||||
|
||||
if (check) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (i > 0) {
|
||||
ThreadUtl.sleep(300L);
|
||||
}
|
||||
|
||||
if (i > 3) {
|
||||
log.info("写入次数超过3次而失败");
|
||||
throw new WDKException("写入次数超过3次而失败");
|
||||
}
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
public void writing(String param, String value) {
|
||||
|
||||
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
@@ -1020,6 +934,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
map.put("to_onset", Integer.parseInt(start_addr));
|
||||
map.put("to_task", Integer.parseInt(instdto.getInstruction_code()));
|
||||
map.put("to_target", Integer.parseInt(next_addr));
|
||||
if(!StrUtil.isEmpty(task.getVersion())){map.put("inflatableShaftVersion", task.getVersion());}
|
||||
this.writing(map);
|
||||
this.setRequireSucess(true);
|
||||
notCreateInstMessage = "";
|
||||
|
||||
@@ -701,10 +701,8 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
//JSONObject jo = new JSONObject();
|
||||
String mode = "";
|
||||
String move = "";
|
||||
|
||||
if (this.getMode() == 0) {
|
||||
mode = "未联机";
|
||||
} else if (this.getMode() == 1) {
|
||||
@@ -721,40 +719,9 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
}else if(this.getMove() == 1){
|
||||
move = "有托盘";
|
||||
}
|
||||
/*jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
|
||||
jo.put("inventory_qty", item_qty1);
|
||||
jo.put("move", move);
|
||||
jo.put("out_finish", out_finish);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("material1", this.getItem_material1());
|
||||
jo.put("z_qty1", this.getItem_qty1());
|
||||
jo.put("material2", this.getItem_material2());
|
||||
jo.put("z_qty2", this.getItem_qty2());
|
||||
jo.put("material3", this.getItem_material3());
|
||||
jo.put("z_qty3", this.getItem_qty3());
|
||||
jo.put("material4", this.getItem_material4());
|
||||
jo.put("z_qty4", this.getItem_qty4());
|
||||
jo.put("material5", this.getItem_material5());
|
||||
jo.put("z_qty5", this.getItem_qty5());
|
||||
jo.put("material6", this.getItem_material6());
|
||||
jo.put("z_qty6", this.getItem_qty6());
|
||||
jo.put("material7", this.getItem_material7());
|
||||
jo.put("z_qty7", this.getItem_qty7());
|
||||
jo.put("material8", this.getItem_material8());
|
||||
jo.put("z_qty8", this.getItem_qty8());
|
||||
jo.put("material9", this.getItem_material9());
|
||||
jo.put("z_qty9", this.getItem_qty9());
|
||||
jo.put("material10", this.getItem_material10());
|
||||
jo.put("z_qty10", this.getItem_qty10());
|
||||
jo.put("material11", this.getItem_material11());
|
||||
jo.put("z_qty11", this.getItem_qty11());
|
||||
jo.put("material12", this.getItem_material12());
|
||||
jo.put("z_qty12", this.getItem_qty12());*/
|
||||
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("device_name", this.getDevice().getDevice_name());
|
||||
map.put("is_click", true);
|
||||
map.put("mode", mode);
|
||||
map.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(this.getError())));
|
||||
map.put("move", move);
|
||||
@@ -785,8 +752,12 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
map.put("z_qty11", this.getItem_qty11());
|
||||
map.put("material12", this.getItem_material12());
|
||||
map.put("z_qty12", this.getItem_qty12());
|
||||
|
||||
|
||||
String requireSucess = "0";
|
||||
if (this.requireSucess) {
|
||||
requireSucess = "1";
|
||||
}
|
||||
map.put("requireSucess", requireSucess);
|
||||
map.put("driver_type", "conveyor");
|
||||
JSONObject jo = new JSONObject(map);
|
||||
return jo;
|
||||
}
|
||||
@@ -976,7 +947,12 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
|
||||
@Override
|
||||
public void setDeviceStatus(JSONObject data) {
|
||||
|
||||
String requestSucess = data.getString("requireSucess");
|
||||
if (StrUtil.equals(requestSucess, "0")) {
|
||||
this.requireSucess = false;
|
||||
} else if (StrUtil.equals(requestSucess, "1")) {
|
||||
this.requireSucess = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean arrayEquals(int[] a, int[] b) {
|
||||
|
||||
@@ -325,7 +325,7 @@ public class TaskDto implements Serializable {
|
||||
/**
|
||||
* 气胀轴代数
|
||||
*/
|
||||
private String version;
|
||||
private String version = "0";
|
||||
|
||||
/**
|
||||
* 是否套管
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
window.g = {
|
||||
dev: {
|
||||
VUE_APP_BASE_API: 'http://127.0.0.1:8012'
|
||||
VUE_APP_BASE_API: 'http://127.0.0.1:8015'
|
||||
},
|
||||
prod: {
|
||||
VUE_APP_BASE_API: 'http://127.0.0.1:8012'
|
||||
|
||||
@@ -319,10 +319,10 @@
|
||||
<el-input v-model="form.is_bushing" style="width: 240px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<!-- 页面中的表单项 -->
|
||||
<el-form-item label="纸管数组">
|
||||
<el-form-item v-if="form.task_type === '10'" label="纸管数组">
|
||||
<el-button v-if="showAddRowButton" style="color: #6b75e9;" @click="addNewRow">添加新行</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-form-item v-if="form.task_type === '10'">
|
||||
<el-form :model="form">
|
||||
<el-table
|
||||
style="width: 100%;"
|
||||
|
||||
@@ -195,6 +195,24 @@
|
||||
<el-button type="primary" @click="saveBarcode">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="设备设置" :visible.sync="dialogFormVisible10" 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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible10 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogSave">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -231,6 +249,7 @@ export default {
|
||||
dialogFormVisible6: false,
|
||||
dialogFormVisible7: false,
|
||||
dialogFormVisible8: false,
|
||||
dialogFormVisible10: false,
|
||||
form: {
|
||||
device_code: '',
|
||||
hasGoodStatus: null,
|
||||
@@ -365,6 +384,7 @@ export default {
|
||||
this.dialogFormVisible1 = true
|
||||
} else {
|
||||
console.log(clickObj.data.driver_type)
|
||||
|
||||
if (clickObj.data.driver_type === 'standard_ordinary_site') {
|
||||
this.dialogFormVisible3 = true
|
||||
} else if (clickObj.data.driver_type === 'hailiang_packer_station') {
|
||||
@@ -386,6 +406,8 @@ export default {
|
||||
this.dialogFormVisible8 = true
|
||||
} else if (clickObj.data.driver_type === 'standard_conveyor_control_with_scanner') {
|
||||
this.dialogFormVisible6 = true
|
||||
} else if (clickObj.data.driver_type === 'station' || clickObj.data.driver_type === 'conveyor') {
|
||||
this.dialogFormVisible10 = true
|
||||
} else {
|
||||
this.dialogFormVisible8 = true
|
||||
}
|
||||
@@ -777,6 +799,8 @@ export default {
|
||||
this.dialogFormVisible6 = false
|
||||
this.dialogFormVisible7 = false
|
||||
this.dialogFormVisible8 = false
|
||||
this.dialogFormVisible10 = false
|
||||
this.dialogFormVisible11 = false
|
||||
this.initStageData()
|
||||
}).catch(err => {
|
||||
this.dialogFormVisible = false
|
||||
@@ -785,6 +809,8 @@ export default {
|
||||
this.dialogFormVisible5 = false
|
||||
this.dialogFormVisible7 = false
|
||||
this.dialogFormVisible8 = false
|
||||
this.dialogFormVisible10 = false
|
||||
this.dialogFormVisible11 = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user