Selaa lähdekoodia

应急列表分页接口修改

tags/v1.2.0^2
chengwang 1 vuosi sitten
vanhempi
commit
b2c4a48f51
5 muutettua tiedostoa jossa 42 lisäystä ja 20 poistoa
  1. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Accident.java
  2. +25
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/FlagEnum.java
  3. +0
    -5
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/IAccidentService.java
  4. +2
    -15
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/query/QueryAccidentPageListService.java
  5. +10
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/accident/AccidentDetailsVo.java

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Accident.java Näytä tiedosto

@@ -134,4 +134,9 @@ public class Accident extends BaseEntity {
*/
private String checkResult;

/**
* 对应任务的应急类型
*/
private Integer flag;

}

+ 25
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/FlagEnum.java Näytä tiedosto

@@ -0,0 +1,25 @@
package com.tuoheng.admin.enums;

import lombok.Getter;

/**
* @Author ChengWang
* @Date 2023/3/9
*/
public enum FlagEnum {

ACCIDENT(1,"应急任务应急记录"),

INSPECTION_ACCIDENT(0,"巡检任务应急记录");

FlagEnum(int code, String description){
this.code = code;
this.description = description;
}

@Getter
private int code;

@Getter
private String description;
}

+ 0
- 5
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/IAccidentService.java Näytä tiedosto

@@ -1,12 +1,7 @@
package com.tuoheng.admin.service.accident;

import com.tuoheng.admin.entity.Accident;
import com.tuoheng.admin.entity.Section;
import com.tuoheng.admin.query.AccidentQuery;
import com.tuoheng.admin.query.SectionQuery;
import com.tuoheng.admin.request.accident.QueryAccidentPageListRequest;
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest;
import com.tuoheng.common.core.common.IBaseService;
import com.tuoheng.common.core.utils.JsonResult;

/**

+ 2
- 15
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/query/QueryAccidentPageListService.java Näytä tiedosto

@@ -2,33 +2,22 @@ package com.tuoheng.admin.service.accident.query;

import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tuoheng.admin.conver.AccidentConverMapper;
import com.tuoheng.admin.conver.InspectionConverMapper;
import com.tuoheng.admin.entity.Accident;
import com.tuoheng.admin.entity.Dept;
import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.enums.AccidentEnum;
import com.tuoheng.admin.enums.FlagEnum;
import com.tuoheng.admin.enums.MarkEnum;
import com.tuoheng.admin.enums.RoleEnum;
import com.tuoheng.admin.enums.code.inspection.QueryInspectionPageListCodeEnum;
import com.tuoheng.admin.mapper.AccidentMapper;
import com.tuoheng.admin.mapper.DeptMapper;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.mapper.UserMapper;
import com.tuoheng.admin.query.AccidentQuery;
import com.tuoheng.admin.request.accident.QueryAccidentPageListRequest;
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest;
import com.tuoheng.admin.service.inspection.query.handle.GenerateInspectionFieldHander;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.accident.AccidentVo;
import com.tuoheng.admin.vo.accident.QueryAccidentPageVO;
import com.tuoheng.admin.vo.inspection.InspectionVo;
import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.enums.ServiceExceptionEnum;
import com.tuoheng.common.core.exception.ServiceException;
import com.tuoheng.common.core.utils.DateUtils;
@@ -37,15 +26,12 @@ import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
@@ -175,6 +161,7 @@ public class QueryAccidentPageListService {
.eq(null != query.getDeptId(),Accident::getDeptId,query.getDeptId())
.between(null != query.getAccidentStartTime() && null != query.getAccidentEndTime(),
Accident::getCreateTime, query.getAccidentStartTime(), query.getAccidentEndTime())
.eq(Accident::getFlag, FlagEnum.INSPECTION_ACCIDENT.getCode())
.eq(Accident::getMark, MarkEnum.VALID.getCode())
.orderByDesc(Accident::getCreateTime));
//属性复制

+ 10
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/accident/AccidentDetailsVo.java Näytä tiedosto

@@ -51,6 +51,16 @@ public class AccidentDetailsVo {
*/
private String sectionId;

/**
* 事故任务id
*/
private String accidentInspectionId;

/**
* 巡检任务id
*/
private String inspectionId;

/**
* 任务执行时间
*/

Loading…
Peruuta
Tallenna