新增机台Bug修改

This commit is contained in:
liuzhaotian
2024-09-11 17:42:24 +08:00
parent 9beaa203e0
commit 83bacf8f4f
3 changed files with 140 additions and 130 deletions
@@ -236,9 +236,9 @@ public class GlobalExceptionHandler {
return tableNotExistsResult;
}
if(ex instanceof NullPointerException){
return CommonResult.error(DATA_EXCEPTION_ERROR.getCode(), DATA_EXCEPTION_ERROR.getMsg());
}
// if(ex instanceof NullPointerException){
// return CommonResult.error(DATA_EXCEPTION_ERROR.getCode(), DATA_EXCEPTION_ERROR.getMsg());
// }
// 情况二:部分特殊的库的处理
if (Objects.equals("io.github.resilience4j.ratelimiter.RequestNotPermitted", ex.getClass().getName())) {
@@ -176,8 +176,10 @@ public class MachineServiceImpl implements MachineService {
JsonNode advancedConfigsRef = cuttingSetting.get("advancedConfigsRef");
if(advancedConfigsRef.get("isAutoLabelEnabled") != null) {
boolean isAutoLabelEnabled = advancedConfigsRef.get("isAutoLabelEnabled").asBoolean();
if (isAutoLabelEnabled && advancedConfigsRef.has("autoLabelModel")) {
Integer autoLabelModelId = advancedConfigsRef.get("autoLabelModel").asInt();
@@ -241,6 +243,7 @@ public class MachineServiceImpl implements MachineService {
}
}
}
return null;
}
@@ -254,6 +257,8 @@ public class MachineServiceImpl implements MachineService {
JsonNode cuttingModuleRef = drillSetting.get("cuttingModuleRef");
if(cuttingModuleRef.get("isDrillEnabled") != null) {
boolean isDrillEnabled = cuttingModuleRef.get("isDrillEnabled").asBoolean();
if (isDrillEnabled && cuttingModuleRef.has("drillModel")) {
@@ -319,6 +324,7 @@ public class MachineServiceImpl implements MachineService {
return mapper.writerWithDefaultPrettyPrinter().writeValueAsString(map);
}
}
}
return null;
}
@@ -503,6 +503,7 @@ public class MachineTemplateServiceImpl implements MachineTemplateService {
JsonNode advancedConfigsRef = cuttingSetting.get("advancedConfigsRef");
if(advancedConfigsRef.get("isAutoLabelEnabled") != null) {
boolean isAutoLabelEnabled = advancedConfigsRef.get("isAutoLabelEnabled").asBoolean();
if (isAutoLabelEnabled && advancedConfigsRef.get("autoLabelBrand") != null && advancedConfigsRef.get("autoLabelModel") != null) {
@@ -541,6 +542,7 @@ public class MachineTemplateServiceImpl implements MachineTemplateService {
}
}
}
return null;
}
@@ -552,6 +554,7 @@ public class MachineTemplateServiceImpl implements MachineTemplateService {
JsonNode cuttingModuleRef = drillSetting.get("cuttingModuleRef");
if(cuttingModuleRef.get("isDrillEnabled") != null) {
boolean isDrillEnabled = cuttingModuleRef.get("isDrillEnabled").asBoolean();
if (isDrillEnabled && cuttingModuleRef.get("drillBrand") != null && cuttingModuleRef.get("drillModel") != null) {
@@ -590,6 +593,7 @@ public class MachineTemplateServiceImpl implements MachineTemplateService {
}
}
}
return null;
}