From 8d6b17bfa56fd767c6f9de666eb0dd44c6b032cd Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 22 五月 2025 15:42:38 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/java/com/example/erp/service/sd/BasicGlassTypeService.java | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/BasicGlassTypeService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/BasicGlassTypeService.java
index 92adb29..307bc6a 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/BasicGlassTypeService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/BasicGlassTypeService.java
@@ -35,7 +35,7 @@
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) );
}
@@ -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);
--
Gitblit v1.8.0