|
@@ -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);
|