chenlu
2024-06-07 2f640b1038fa331954f78ed1f4317212cf5bb34d
north-glass-erp/src/main/java/com/example/erp/service/sd/BasicGlassTypeService.java
@@ -84,7 +84,13 @@
                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);