|
|
@@ -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)); |
|
|
|
//属性复制 |