diff --git a/jeecg-boot/jeecg-boot-module-demo/src/main/java/org/jeecg/modules/demo/kitreader/inspectioninfor/InspectionInfor.java b/jeecg-boot/jeecg-boot-module-demo/src/main/java/org/jeecg/modules/demo/kitreader/inspectioninfor/InspectionInfor.java index 8e720e92fc7d3292f9d4a45bd86a50ed4c34a058..69341c4b3b81f0e3588b747faac1eccef89649bf 100644 --- a/jeecg-boot/jeecg-boot-module-demo/src/main/java/org/jeecg/modules/demo/kitreader/inspectioninfor/InspectionInfor.java +++ b/jeecg-boot/jeecg-boot-module-demo/src/main/java/org/jeecg/modules/demo/kitreader/inspectioninfor/InspectionInfor.java @@ -129,7 +129,7 @@ public class InspectionInfor { } if (inspectionInfo.get("06")==null || "".equalsIgnoreCase(inspectionInfo.get("06"))){ //如果不存在数据执行回调函数 - getInspectionInfo(); + //getInspectionInfo(); }else { switch (inspectionInfo.get("06").split(",")[1]){ case "01":inspectionInfo.put("01",inspectionInfo.get("06"));break; diff --git a/jeecg-boot/jeecg-boot-module-demo/src/main/java/org/jeecg/modules/demo/toolbox/rest/ToolboxRestController.java b/jeecg-boot/jeecg-boot-module-demo/src/main/java/org/jeecg/modules/demo/toolbox/rest/ToolboxRestController.java index 491287c66678e369013c71d1e2c8334be97a00ad..840a9bb62412d12721830b270e301a065556e506 100644 --- a/jeecg-boot/jeecg-boot-module-demo/src/main/java/org/jeecg/modules/demo/toolbox/rest/ToolboxRestController.java +++ b/jeecg-boot/jeecg-boot-module-demo/src/main/java/org/jeecg/modules/demo/toolbox/rest/ToolboxRestController.java @@ -251,25 +251,28 @@ public class ToolboxRestController { isInspectionStatus = false; //解析巡检信息 map = InspectionInfor.encodingInspectionInfo(); - WarningInfo r01 = InspectionInfor.getWarningInfor(map.get("r01")); - WarningInfo r02 = InspectionInfor.getWarningInfor(map.get("r02")); - WarningInfo r03 = InspectionInfor.getWarningInfor(map.get("r03")); - WarningInfo r04 = InspectionInfor.getWarningInfor(map.get("r04")); - WarningInfo r05 = InspectionInfor.getWarningInfor(map.get("r05")); - WarningInfo r06 = InspectionInfor.getWarningInfor(map.get("r06")); + WarningInfo res = null; + if (map.get("r01") != null){ + res = InspectionInfor.getWarningInfor(map.get("r01")); + } + if (map.get("r02") != null){ + res = InspectionInfor.getWarningInfor(map.get("r02")); + } + if (map.get("r03") != null){ + res = InspectionInfor.getWarningInfor(map.get("r03")); + } + if (map.get("r04") != null){ + res = InspectionInfor.getWarningInfor(map.get("r04")); + } + if (map.get("r05") != null){ + res = InspectionInfor.getWarningInfor(map.get("r05")); + } + if (map.get("r06") != null){ + res = InspectionInfor.getWarningInfor(map.get("r06")); + } try { - if (r01 != null){ - warningInfoService.save(r01); - }else if (r02 != null){ - warningInfoService.save(r02); - }else if (r03 != null){ - warningInfoService.save(r03); - }else if (r04 != null){ - warningInfoService.save(r04); - }else if (r05 != null){ - warningInfoService.save(r05); - }else if (r06 != null){ - warningInfoService.save(r06); + if (res != null){ + warningInfoService.save(res); } }catch (Exception e){ return null;