Browse Source

巡更系统优化

hanzhengyi 1 week ago
parent
commit
62e3acff01

+ 12 - 12
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionPlanServiceImpl.java

@@ -291,12 +291,12 @@ public class PatrolInspectionPlanServiceImpl extends AbstractCrudService<PatrolI
     @Override
     @Transactional
     public void updatePatrolInspectionPlan(PatrolInspectionPlanVo patrolInspectionPlanVo) {
-        LambdaQueryWrapper<PatrolInspectionRecord> queryWrapperSix = Wrappers.lambdaQuery();
-        queryWrapperSix.eq(PatrolInspectionRecord::getPlanId, patrolInspectionPlanVo.getId());
-        List<PatrolInspectionRecord> patrolInspectionRecordList = patrolInspectionRecordService.list(queryWrapperSix);
-        if (patrolInspectionRecordList.size() > 0) {
-            throw new BusinessException("巡检计划已执行中不可修改");
-        }
+//        LambdaQueryWrapper<PatrolInspectionRecord> queryWrapperSix = Wrappers.lambdaQuery();
+//        queryWrapperSix.eq(PatrolInspectionRecord::getPlanId, patrolInspectionPlanVo.getId());
+//        List<PatrolInspectionRecord> patrolInspectionRecordList = patrolInspectionRecordService.list(queryWrapperSix);
+//        if (patrolInspectionRecordList.size() > 0) {
+//            throw new BusinessException("巡检计划已执行中不可修改");
+//        }
         Integer planCycle = patrolInspectionPlanVo.getPlanCycle();
         String timeStr = patrolInspectionPlanVo.getStartDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
         Date startDate = OnlineMethod.getDate(timeStr);
@@ -575,12 +575,12 @@ public class PatrolInspectionPlanServiceImpl extends AbstractCrudService<PatrolI
     @Override
     @Transactional
     public void delPatrolInspectionPlan(Integer id) {
-        LambdaQueryWrapper<PatrolInspectionRecord> queryWrapperSix = Wrappers.lambdaQuery();
-        queryWrapperSix.eq(PatrolInspectionRecord::getPlanId, id);
-        List<PatrolInspectionRecord> patrolInspectionRecordList = patrolInspectionRecordService.list(queryWrapperSix);
-        if (patrolInspectionRecordList.size() > 0) {
-            throw new BusinessException("巡检计划已执行中不可删除");
-        }
+//        LambdaQueryWrapper<PatrolInspectionRecord> queryWrapperSix = Wrappers.lambdaQuery();
+//        queryWrapperSix.eq(PatrolInspectionRecord::getPlanId, id);
+//        List<PatrolInspectionRecord> patrolInspectionRecordList = patrolInspectionRecordService.list(queryWrapperSix);
+//        if (patrolInspectionRecordList.size() > 0) {
+//            throw new BusinessException("巡检计划已执行中不可删除");
+//        }
         PatrolInspectionPlan patrolInspectionPlan = new PatrolInspectionPlan();
         patrolInspectionPlan.setId(id);
         patrolInspectionPlan.setEnable(0);