巡检点上次巡检时间

master
张乾翔 3 days ago
parent b11d6f94b4
commit a13a3fb8bf
  1. 7
      blade-service/blade-desk/src/main/java/org/springblade/desk/energy/service/impl/BsEpciuPatrolInspectionServiceImpl.java

@ -134,7 +134,7 @@ public class BsEpciuPatrolInspectionServiceImpl extends BaseServiceImpl<BsEpciuP
epPatrolInspection.setTaskStatus(BsEpciuPatrolInspectionEntity.PREPARE_TEXT.toString()); epPatrolInspection.setTaskStatus(BsEpciuPatrolInspectionEntity.PREPARE_TEXT.toString());
baseMapper.insertOrUpdate(epPatrolInspection); baseMapper.insertOrUpdate(epPatrolInspection);
// 保存触发任务的时间 // 保存触发任务的时间
epInspectionPoint.setLastInsCycle(new Date()); //epInspectionPoint.setLastInsCycle(new Date());
bsEpciuInspectionPointService.saveOrUpdate(epInspectionPoint); bsEpciuInspectionPointService.saveOrUpdate(epInspectionPoint);
} else { } else {
Boolean isAdd = false; Boolean isAdd = false;
@ -174,7 +174,7 @@ public class BsEpciuPatrolInspectionServiceImpl extends BaseServiceImpl<BsEpciuP
epPatrolInspection.setTaskStatus(BsEpciuPatrolInspectionEntity.PREPARE_TEXT.toString()); epPatrolInspection.setTaskStatus(BsEpciuPatrolInspectionEntity.PREPARE_TEXT.toString());
baseMapper.insertOrUpdate(epPatrolInspection); baseMapper.insertOrUpdate(epPatrolInspection);
// 保存触发任务的时间 // 保存触发任务的时间
epInspectionPoint.setLastInsCycle(new Date()); //epInspectionPoint.setLastInsCycle(new Date());
bsEpciuInspectionPointService.saveOrUpdate(epInspectionPoint); bsEpciuInspectionPointService.saveOrUpdate(epInspectionPoint);
} }
} }
@ -240,6 +240,9 @@ public class BsEpciuPatrolInspectionServiceImpl extends BaseServiceImpl<BsEpciuP
updateById(bsEpciuPatrolInspection); updateById(bsEpciuPatrolInspection);
// 将其他同类的巡检任务置为未检 // 将其他同类的巡检任务置为未检
List<BsEpciuInspectionPointEntity> safeInspectionPointList = bsEpciuInspectionPointService.listByCode(bsEpciuPatrolInspection.getInsNum()); List<BsEpciuInspectionPointEntity> safeInspectionPointList = bsEpciuInspectionPointService.listByCode(bsEpciuPatrolInspection.getInsNum());
if (CollUtil.isEmpty(safeInspectionPointList)){
return;
}
Set<Long> pointIds = safeInspectionPointList.stream().map(BsEpciuInspectionPointEntity::getId).collect(Collectors.toSet()); Set<Long> pointIds = safeInspectionPointList.stream().map(BsEpciuInspectionPointEntity::getId).collect(Collectors.toSet());
update(Wrappers.lambdaUpdate(BsEpciuPatrolInspectionEntity.class) update(Wrappers.lambdaUpdate(BsEpciuPatrolInspectionEntity.class)
.in(BsEpciuPatrolInspectionEntity::getEpcId, pointIds) .in(BsEpciuPatrolInspectionEntity::getEpcId, pointIds)

Loading…
Cancel
Save