mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 13:42:07 +08:00
新增机台Bug修改
This commit is contained in:
+3
-3
@@ -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())) {
|
||||
|
||||
+10
-4
@@ -176,14 +176,16 @@ 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();
|
||||
|
||||
MachineDO newMachine ;
|
||||
MachineDO newMachine;
|
||||
|
||||
if(isMachine){
|
||||
if (isMachine) {
|
||||
|
||||
MachineDO machine = machineMapper.selectById(autoLabelModelId);
|
||||
if (machine != null) {
|
||||
@@ -241,6 +243,7 @@ public class MachineServiceImpl implements MachineService {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -254,14 +257,16 @@ 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")) {
|
||||
Integer drillModelId = cuttingModuleRef.get("drillModel").asInt();
|
||||
|
||||
MachineDO newMachine ;
|
||||
MachineDO newMachine;
|
||||
|
||||
if(isMachine){
|
||||
if (isMachine) {
|
||||
|
||||
MachineDO machine = machineMapper.selectById(drillModelId);
|
||||
if (machine != null) {
|
||||
@@ -319,6 +324,7 @@ public class MachineServiceImpl implements MachineService {
|
||||
return mapper.writerWithDefaultPrettyPrinter().writeValueAsString(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
+8
-4
@@ -503,9 +503,10 @@ 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){
|
||||
if (isAutoLabelEnabled && advancedConfigsRef.get("autoLabelBrand") != null && advancedConfigsRef.get("autoLabelModel") != null) {
|
||||
|
||||
Integer autoLabelModelId = advancedConfigsRef.get("autoLabelModel").asInt();
|
||||
|
||||
@@ -535,12 +536,13 @@ public class MachineTemplateServiceImpl implements MachineTemplateService {
|
||||
// 将 Map 转换为 JSON 字符串
|
||||
return mapper.writerWithDefaultPrettyPrinter().writeValueAsString(map);
|
||||
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
|
||||
throw exception(LABELINGMACHINE_RELATED_DATA_ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -552,9 +554,10 @@ 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){
|
||||
if (isDrillEnabled && cuttingModuleRef.get("drillBrand") != null && cuttingModuleRef.get("drillModel") != null) {
|
||||
|
||||
Integer drillModelId = cuttingModuleRef.get("drillModel").asInt();
|
||||
|
||||
@@ -584,12 +587,13 @@ public class MachineTemplateServiceImpl implements MachineTemplateService {
|
||||
// 将 Map 转换为 JSON 字符串
|
||||
return mapper.writerWithDefaultPrettyPrinter().writeValueAsString(map);
|
||||
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
|
||||
throw exception(DRILLMACHINE_RELATED_DATA_ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user