| | |
| | | for (BasicGlassType basicGlassType : twoGlassType) { |
| | | if (Objects.equals(basicGlassType.getBelong(), glassType.getTypeId())) { |
| | | Map<String,String> getMap = JSON.parseObject(JSON.toJSONString(basicGlassType), Map.class); |
| | | getMap.put("value",getMap.get("typeID")); |
| | | getMap.put("value",getMap.get("typeId")); |
| | | getMap.put("label",getMap.get("typeName")); |
| | | equalList.add(JSON.toJSONString(getMap) ); |
| | | } |
| | |
| | | basicGlassTypeS.setTypeName((String) map.get("value")); |
| | | }else if(list.size()==2) { |
| | | BasicGlassType basicGlassType = basicGlassTypeMapper.selectMaxTowLevelType((String) list.get(1)); |
| | | int maxId = Integer.parseInt(basicGlassType.getTypeId().substring(2)); |
| | | Integer maxId = null; |
| | | if(basicGlassType==null){ |
| | | maxId = 0; |
| | | }else { |
| | | maxId = Integer.parseInt(basicGlassType.getTypeId().substring(2)); |
| | | } |
| | | |
| | | String newTypeId =list.get(1) + String.format("%02d", maxId+1); |
| | | basicGlassTypeS.setLevel((Integer) list.get(0)); |
| | | basicGlassTypeS.setTypeId(newTypeId); |