This commit is contained in:
loujf
2022-08-17 16:57:38 +08:00
parent a3626ea095
commit a02a2279f0
4 changed files with 41 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.device_driver.special_ordinary_site.SpecialOrdinarySiteDeviceDriver; import org.nl.acs.device_driver.special_ordinary_site.SpecialOrdinarySiteDeviceDriver;
import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver; import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver;
import org.nl.acs.instruction.service.dto.Instruction; import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device; import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService; import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.opc.DeviceAppServiceImpl; import org.nl.acs.opc.DeviceAppServiceImpl;
@@ -38,7 +39,7 @@ import java.util.Date;
@Slf4j @Slf4j
@Data @Data
@RequiredArgsConstructor @RequiredArgsConstructor
public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver { public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
@Autowired @Autowired
RouteLineService routelineserver = SpringContextHolder.getBean("routeLineServiceImpl"); RouteLineService routelineserver = SpringContextHolder.getBean("routeLineServiceImpl");
@Autowired @Autowired
@@ -385,5 +386,36 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple
} }
} }
@Override
public JSONObject getDeviceStatusName() {
String move = "";
JSONObject jo = new JSONObject();
if (this.getHasGoods() == 0) {
move = "无货";
} else if (this.getHasGoods() == 1) {
move = "有货";
} else if (this.getHasGoods() == 2) {
move = "有托盘有货";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("move", move);
jo.put("container", this.getContainer());
jo.put("hasGoods", this.getHasGoods());
jo.put("isOnline", true);
//点击弹出
jo.put("is_click", true);
jo.put("device_type", device.getDevice_type());
jo.put("error", this.getError());
jo.put("isError", this.getIserror());
jo.put("message", this.getMessage());
jo.put("material", this.getMaterial());
jo.put("batch", this.getBatch());
return jo;
}
@Override
public void setDeviceStatus(JSONObject data) {
}
} }

View File

@@ -44,6 +44,7 @@ public class DeviceStageMonitorServiceImpl implements DeviceStageMonitorService
} }
obj.put("data", json); obj.put("data", json);
obj.put("device_name",json.get("device_name"));
obj.put("device_code", js.get("device_code")); obj.put("device_code", js.get("device_code"));
obj.put("id", js.getString("id")); // 设备不存在就只保留id方便前端查看 obj.put("id", js.getString("id")); // 设备不存在就只保留id方便前端查看
arr.add(obj); arr.add(obj);

View File

@@ -61,6 +61,8 @@
<el-select <el-select
v-model="form.get_device_code1" v-model="form.get_device_code1"
multiple multiple
filterable
reserveKeyword
placeholder="请选择" placeholder="请选择"
> >
<el-option <el-option
@@ -89,6 +91,7 @@
<el-select <el-select
v-model="form.put_device_code1" v-model="form.put_device_code1"
filterable filterable
reserveKeyword
multiple multiple
placeholder="请选择" placeholder="请选择"
> >
@@ -105,6 +108,8 @@
<el-form-item label="后工位取货点" prop="device_code" label-width="200"> <el-form-item label="后工位取货点" prop="device_code" label-width="200">
<el-select <el-select
v-model="form.get_device_code2" v-model="form.get_device_code2"
filterable
reserveKeyword
multiple multiple
placeholder="请选择" placeholder="请选择"
> >
@@ -134,6 +139,7 @@
<el-select <el-select
v-model="form.put_device_code2" v-model="form.put_device_code2"
filterable filterable
reserveKeyword
multiple multiple
placeholder="请选择" placeholder="请选择"
> >

View File

@@ -496,7 +496,7 @@ export default {
}, },
dialogSave() { dialogSave() {
deviceCrud.changeDeviceStatus(this.form).then(res => { deviceCrud.changeDeviceStatus(this.form).then(res => {
this.notify('操作成功', 'success') this.$notify({ title: '操作成功', message: '', type: 'success' });
this.dialogFormVisible = false this.dialogFormVisible = false
this.dialogFormVisible3 = false this.dialogFormVisible3 = false
this.dialogFormVisible4 = false this.dialogFormVisible4 = false