fix(material): 修复材料编码生成问题
This commit is contained in:
@@ -144,7 +144,7 @@ public class MaterialController {
|
|||||||
query.orderByDesc(Material::getId);
|
query.orderByDesc(Material::getId);
|
||||||
var data = materialService.list(query);
|
var data = materialService.list(query);
|
||||||
String maxBrotherId;
|
String maxBrotherId;
|
||||||
if (data == null) {
|
if (data == null || data.size() == 0) {
|
||||||
maxBrotherId = null;
|
maxBrotherId = null;
|
||||||
} else {
|
} else {
|
||||||
maxBrotherId = data.get(0).getId();
|
maxBrotherId = data.get(0).getId();
|
||||||
|
@@ -11,6 +11,9 @@ public class MaterialService extends ServiceImpl<BaseMapper<Material>, Material>
|
|||||||
String prefix;
|
String prefix;
|
||||||
String suffix;
|
String suffix;
|
||||||
String previous;
|
String previous;
|
||||||
|
if (maxBrotherId == null) {
|
||||||
|
maxBrotherId = "60.60.60.60";
|
||||||
|
}
|
||||||
if (parentId.contains("00.00.00.00")) {
|
if (parentId.contains("00.00.00.00")) {
|
||||||
prefix = "";
|
prefix = "";
|
||||||
suffix = ".00.00.00";
|
suffix = ".00.00.00";
|
||||||
|
Reference in New Issue
Block a user