kongzy
2024-07-01 47a751cb301d05276ae5d75145d57b2d090fe4e1
src/main/java/com/nanometer/smartlab/controller/LaboratoryContainerMngController.java
@@ -58,7 +58,7 @@
   /**
    * 数据模型
    */
   private SysLaboratoryContainer sysLaboratoryContainer;
   private SysLaboratoryContainer sysLaboratoryContainer=new SysLaboratoryContainer();
   /**
    * 选中的list
    */
@@ -209,8 +209,8 @@
               return;
            }
            sysLaboratoryContainer.setProject(null);
            sysLaboratoryContainer.getProject();
//            sysLaboratoryContainer.setProject(null);
//            sysLaboratoryContainer.getProject();
            this.sysLaboratoryContainerService.updateSysLaboratoryContainer(sysLaboratoryContainer);
@@ -329,8 +329,8 @@
      }
   }
   public String getBaseMetaId(List<BaseMeta> list,String name){
      String id="";
   public Long getBaseMetaId(List<BaseMeta> list,String name){
      Long id=null;
      for(int i=0;i<list.size();i++){
         if(name.equals(list.get(i).getMetaValue())){
            id=list.get(i).getId();
@@ -339,8 +339,8 @@
      return  id;
   }
   public String getLabId(List<SysLaboratory> list,String name){
      String id="";
   public Long getLabId(List<SysLaboratory> list,String name){
      Long id=null;
      for(int i=0;i<list.size();i++){
         if(list.get(i).getName().equals(name)){
            id=list.get(i).getId();
@@ -398,12 +398,13 @@
               List<SysLaboratoryContainer> list = null;
               try {
                  int count = sysLaboratoryContainerService.getSysLaboratoryContainerTotalCount(laboratoryType,
                        laboratoryName,null,project,controllerName);
                        laboratoryName,null,project);
                  this.setRowCount(count);
                  if (count > 0) {
                     list = sysLaboratoryContainerService.getSysLaboratoryContainerList(laboratoryType,
                           laboratoryName,null,project,controllerName, first, pageSize);
                           laboratoryName,null,project, first, pageSize);
                  }
                  selectedList = new ArrayList<> ();
               } catch (Exception e) {
                  logger.error(e);
               }
@@ -412,17 +413,18 @@
            @Override
            public SysLaboratoryContainer getRowData(String rowKey) {
               Iterator<SysLaboratoryContainer> iterator = this.iterator();
               if (iterator != null) {
                  SysLaboratoryContainer su = null;
                  while (iterator.hasNext()) {
                     su = iterator.next();
                     if (rowKey.equals(su.getId())) {
                        return su;
                     }
                  }
               }
               return null;
//               Iterator<SysLaboratoryContainer> iterator = this.iterator();
//               if (iterator != null) {
//                  SysLaboratoryContainer su = null;
//                  while (iterator.hasNext()) {
//                     su = iterator.next();
//                     if (rowKey.equals(su.getId())) {
//                        return su;
//                     }
//                  }
//               }
               Long id=Long.valueOf(rowKey);
               return sysLaboratoryContainerService.getSysLaboratoryContainer(id);
            }
         };
      }