|
@@ -0,0 +1,53 @@
|
|
|
+package com.usky.fire.service.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.usky.common.core.bean.CommonPage;
|
|
|
+import com.usky.common.security.utils.SecurityUtils;
|
|
|
+import com.usky.fire.domain.PatrolInspectionEvent;
|
|
|
+import com.usky.fire.mapper.PatrolInspectionEventMapper;
|
|
|
+import com.usky.fire.service.PatrolInspectionEventService;
|
|
|
+import com.usky.common.mybatis.core.AbstractCrudService;
|
|
|
+import com.usky.fire.service.vo.PatrolInspectionPlanRequestVO;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 事件管理表 服务实现类
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author han
|
|
|
+ * @since 2024-05-09
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class PatrolInspectionEventServiceImpl extends AbstractCrudService<PatrolInspectionEventMapper, PatrolInspectionEvent> implements PatrolInspectionEventService {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public CommonPage<PatrolInspectionEvent> patrolInspectionEventList(PatrolInspectionPlanRequestVO requestVO){
|
|
|
+ Integer current = requestVO.getPageNum();
|
|
|
+ Integer size = requestVO.getPageSize();
|
|
|
+ IPage<PatrolInspectionEvent> page = new Page<>(current,size);
|
|
|
+ LambdaQueryWrapper<PatrolInspectionEvent> queryWrapper = Wrappers.lambdaQuery();
|
|
|
+ queryWrapper.eq(StringUtils.isNotBlank(requestVO.getDeviceId()),PatrolInspectionEvent::getDeviceId,requestVO.getDeviceId())
|
|
|
+ .eq(requestVO.getEventLevel() != null,PatrolInspectionEvent::getEventLevel,requestVO.getEventLevel())
|
|
|
+ .eq(PatrolInspectionEvent::getTenantId, SecurityUtils.getTenantId())
|
|
|
+ .orderByDesc(PatrolInspectionEvent::getId);
|
|
|
+ page = this.page(page,queryWrapper);
|
|
|
+
|
|
|
+ return new CommonPage<>(page.getRecords(),page.getTotal(),size,current);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void add(PatrolInspectionEvent patrolInspectionEvent){
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void edit(PatrolInspectionEvent patrolInspectionEvent){
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+}
|