吉安感知网项目-后端
xiebin
2026-01-17 c1a0c94ecd6e357b39e2aa8dbde01a25781e5ac3
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceMaintainPlanController.java
@@ -99,6 +99,14 @@
      if (null == fwDeviceMaintainPlan.getDeviceId()) {
         return R.fail("参数错误");
      }
      long count = fwDeviceMaintainPlanService.count(new QueryWrapper<FwDeviceMaintainPlanEntity>().lambda()
            .eq(FwDeviceMaintainPlanEntity::getDeviceId, fwDeviceMaintainPlan.getDeviceId()));
      if (count > 0) {
         return R.fail("该设备已建立维护计划");
      }
      return R.status(fwDeviceMaintainPlanService.saveOrUpdate(FwDeviceMaintainPlanWrapper.build().entityDTO(fwDeviceMaintainPlan)));
   }