Bladeren bron

Merge branch 'feature_v1.0' into develop

# Conflicts:
#	tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Inspection.java
#	tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionVo.java
tags/v1.0.0^2
chengwang 1 jaar geleden
bovenliggende
commit
ee0f934c2e
8 gewijzigde bestanden met toevoegingen van 777 en 672 verwijderingen
  1. +272
    -272
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Inspection.java
  2. +3
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/inspectionFile/ListByDeptUserTypeEnum.java
  3. +3
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionFileMapper.java
  4. +3
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionMapper.java
  5. +84
    -21
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/InspectionFileServiceImpl.java
  6. +320
    -320
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionVo.java
  7. +72
    -58
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionFileMapper.xml
  8. +20
    -0
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml

+ 272
- 272
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Inspection.java Bestand weergeven

@@ -1,272 +1,272 @@
package com.tuoheng.admin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.core.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
* 巡检任务对象 th_inspection
*
* @team tuoheng
* @author wanjing
* @date 2022-11-16
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_inspection")
public class Inspection extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 租户ID
*/
private String tenantId;
/**
* 部门ID
*/
private String deptId;
/**
* 巡检任务编号
*/
private String code;
/**
* 巡检任务名称
*/
private String name;
/**
* 巡检任务类型 1 临时巡检
*/
private Integer type;
/**
* 公路ID
*/
private String roadId;
/**
* 公路名称
*/
private String roadName;
/**
* 路段ID
*/
private String sectionId;
/**
* 路段名称
*/
private String sectionName;
/**
* 巡检方式类型 1 无人机 2机场巡逻 3飞手值飞
*/
private Integer inspectionType;
/**
* 巡检机场id
*/
private Integer airportId;
/**
* 巡检机场名称 */
private String airportName;
/**
* 巡检线路id */
private Integer inspectionLine;
/**
* 巡检线路名称
*/
private String inspectionLineName;
/**
* 飞行设备
*/
private String equipmentId;
/**
* 飞行设备名称
*/
private String equipmentName;
/**
* 挂载设备(多选逗号","分隔)
*/
private String equipmentMountId;
/**
* 挂载设备名称(多选逗号","分隔)
*/
private String equipmentMountName;
/**
* 5G云盒ID */
private String cloudBoxId;
/**
* 云盒名称 */
private String cloudBoxName;
/**
* 云盒SN号 */
private String boxSn;
/**
* 飞手(多选逗号","分隔) */
private String flightHand;
/**
* 飞手姓名(多选逗号","分隔)
*/
private String flightHandName;
/**
* 计划巡检日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date inspectionTime;
/**
* 执行开始时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date executionStartTime;
/**
* 执行结束时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date executionEndTime;
/**
* 是否实时,1:实时 2:离线 默认:null
*/
private Integer isLive;
/**
* 是否正摄:1是 2否
*/
private Integer isTaken;
/**
* 是否倾斜摄影:1是 2否
*/
private Integer isTilt;
/**
* 原视频地址
*/
private String videoUrl;
/**
* AI识别后视频地址
*/
private String aiVideoUrl;
/**
* 报告地址
*/
private String reportUrl;
/**
* SRT文件地址
*/
private String srtUrl;
/**
* 任务状态 5任务待飞行 7飞行失败 10任务飞行中 15任务飞行完成
*/
private Integer status;
/**
* 算法处理状态:0默认 1待上传 2待分析 3分析中 4成功 5超时 6失败
*/
private Integer analyseStatus;
/**
*
* ai任务分析进度
*/
private BigDecimal progressbar;
/**
* 备注
*/
private String note;
/**
* 巡检时天气情况
*/
private String weather;
/**
* 飞行高度
*/
private String flyHeight;
/**
* srt文件名称
*/
private String srtName;
/**
* ai心跳更新时间
*/
private Long heartbeatTime;
/**
* 定时任务的执行状态。1:未执行,2:已执行
*/
private Integer executionStatus;
/**
* 起点经度
*/
private String startLongitude;
/**
* 起点纬度
*/
private String startLatitude;
/**
* 终点经度
*/
private String endLongitude;
/**
* 终点纬度
*/
private String endLatitude;
/**
* 联系方式
*/
private String mobile;
/**
* 巡逻地点
*/
private String patrolLocation;
}
package com.tuoheng.admin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.core.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
* 巡检任务对象 th_inspection
*
* @team tuoheng
* @author wanjing
* @date 2022-11-16
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_inspection")
public class Inspection extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 租户ID
*/
private String tenantId;
/**
* 部门ID
*/
private String deptId;
/**
* 巡检任务编号
*/
private String code;
/**
* 巡检任务名称
*/
private String name;
/**
* 巡检任务类型 1 临时巡检
*/
private Integer type;
/**
* 公路ID
*/
private String roadId;
/**
* 公路名称
*/
private String roadName;
/**
* 路段ID
*/
private String sectionId;
/**
* 路段名称
*/
private String sectionName;
/**
* 巡检方式类型 1 无人机 2机场巡逻 3飞手值飞
*/
private Integer inspectionType;
/**
* 巡检机场id
*/
private Integer airportId;
/**
* 巡检机场名称 */
private String airportName;
/**
* 巡检线路id */
private Integer inspectionLine;
/**
* 巡检线路名称
*/
private String inspectionLineName;
/**
* 飞行设备
*/
private String equipmentId;
/**
* 飞行设备名称
*/
private String equipmentName;
/**
* 挂载设备(多选逗号","分隔)
*/
private String equipmentMountId;
/**
* 挂载设备名称(多选逗号","分隔)
*/
private String equipmentMountName;
/**
* 5G云盒ID */
private String cloudBoxId;
/**
* 云盒名称 */
private String cloudBoxName;
/**
* 云盒SN号 */
private String boxSn;
/**
* 飞手(多选逗号","分隔) */
private String flightHand;
/**
* 飞手姓名(多选逗号","分隔)
*/
private String flightHandName;
/**
* 计划巡检日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date inspectionTime;
/**
* 执行开始时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date executionStartTime;
/**
* 执行结束时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date executionEndTime;
/**
* 是否实时,1:实时 2:离线 默认:null
*/
private Integer isLive;
/**
* 是否正摄:1是 2否
*/
private Integer isTaken;
/**
* 是否倾斜摄影:1是 2否
*/
private Integer isTilt;
/**
* 原视频地址
*/
private String videoUrl;
/**
* AI识别后视频地址
*/
private String aiVideoUrl;
/**
* 报告地址
*/
private String reportUrl;
/**
* SRT文件地址
*/
private String srtUrl;
/**
* 任务状态 5任务待飞行 7飞行失败 10任务飞行中 15任务飞行完成
*/
private Integer status;
/**
* 算法处理状态:0默认 1待上传 2待分析 3分析中 4成功 5超时 6失败
*/
private Integer analyseStatus;
/**
*
* ai任务分析进度
*/
private BigDecimal progressbar;
/**
* 备注
*/
private String note;
/**
* 巡检时天气情况
*/
private String weather;
/**
* 飞行高度
*/
private String flyHeight;
/**
* srt文件名称
*/
private String srtName;
/**
* ai心跳更新时间
*/
private Long heartbeatTime;
/**
* 定时任务的执行状态。1:未执行,2:已执行
*/
private Long executionStatus;
/**
* 起点经度
*/
private String startLongitude;
/**
* 起点纬度
*/
private String startLatitude;
/**
* 终点经度
*/
private String endLongitude;
/**
* 终点纬度
*/
private String endLatitude;
/**
* 联系方式
*/
private String mobile;
/**
* 巡逻地点
*/
private String patrolLocation;
}

+ 3
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/inspectionFile/ListByDeptUserTypeEnum.java Bestand weergeven

@@ -10,7 +10,9 @@ public enum ListByDeptUserTypeEnum {
USER_NAME_IS_NULL(1100301, "登录用户名为空"),
USER_IS_NULL(1100302, "用户不存在"),
INSPECTION_TYPE_LIST_IS_NULL(1100303, "问题列表为空"),
QUESTION_ID_IS_NULL(1100304, "问题列表为空");
INSPECTION_LIST_IS_NULL(1100304, "任务列表为空"),
DEPT_ID_IS_NULL(1100305, "部门id为空"),
QUESTION_ID_IS_NULL(1100306, "问题列表为空");

/**
* 错误码

+ 3
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionFileMapper.java Bestand weergeven

@@ -1,8 +1,10 @@
package com.tuoheng.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.entity.InspectionFile;

import java.util.List;
import java.util.Map;

/**
@@ -32,4 +34,5 @@ public interface InspectionFileMapper extends BaseMapper<InspectionFile> {
*/
int deleteByInspectionId(String inspectionId);

List<InspectionFile> selectListByInspectIdList(List<String> inspectionIdList);
}

+ 3
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionMapper.java Bestand weergeven

@@ -66,4 +66,7 @@ public interface InspectionMapper extends BaseMapper<Inspection> {
int deleteByPhysical(String id);

List<Inspection> getListByBox(@Param("boxSn") String boxSn);

List<Inspection> selectListByDeptIdList(List<String> deptIdList);

}

+ 84
- 21
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/InspectionFileServiceImpl.java Bestand weergeven

@@ -1,5 +1,6 @@
package com.tuoheng.admin.service.impl;

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.toolkit.Wrappers;
@@ -9,10 +10,7 @@ import com.tuoheng.admin.entity.QuestionType;
import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.enums.UserTypeEnum;
import com.tuoheng.admin.enums.code.inspectionFile.ListByDeptUserTypeEnum;
import com.tuoheng.admin.mapper.InspectionFileMapper;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.mapper.QuestionTypeMapper;
import com.tuoheng.admin.mapper.UserMapper;
import com.tuoheng.admin.mapper.*;
import com.tuoheng.admin.query.InspectionFileQuery;
import com.tuoheng.admin.service.IInspectionFileService;
import com.tuoheng.admin.utils.ShiroUtils;
@@ -55,6 +53,9 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
@Autowired
private UserMapper userMapper;

@Autowired
private DeptMapper deptMapper;



/**
@@ -115,7 +116,8 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
JsonResult.error(ListByDeptUserTypeEnum.QUERY_IS_FAILED.getCode(),ListByDeptUserTypeEnum.QUERY_IS_FAILED.getMsg());
}
//获取当前登录人信息
String username = SecurityUserUtils.username();
//String username = SecurityUserUtils.username();
String username = "admin";
if(StringUtils.isEmpty(username)){
JsonResult.error(ListByDeptUserTypeEnum.USER_NAME_IS_NULL.getCode(),ListByDeptUserTypeEnum.USER_NAME_IS_NULL.getMsg());
}
@@ -131,8 +133,12 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
}
List<ListByDeptUserTypeVo> list = new ArrayList<>();
ListByDeptUserTypeVo vo = new ListByDeptUserTypeVo();
ListByDeptUserTypeVo vo1 = new ListByDeptUserTypeVo();
ListByDeptUserTypeVo vo2 = new ListByDeptUserTypeVo();
//问题数量
Long count = 0l;
Long pitGrooveNum = 0l;
Long ponDingNum = 0l;
Long crackNum = 0l;
//若角色为超级管理员,查看状态为已生成工单和和问题已处理
if(UserTypeEnum.SUPER_ADMIN.getCode()==user.getType()){
//直接查问题列表
@@ -158,28 +164,85 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
Integer name = questionType.getName();
//1坑槽
if(name==1) {
count+=1;
vo.setType(1);
vo.setNum(count);
list.add(vo);
pitGrooveNum+=1;
}else if(name==2){
//积水
ponDingNum+=1;
}else if(name==3){
//裂缝
crackNum+=1;
}
//
if(name==2){

}
vo.setType(1);
vo1.setType(2);
vo2.setType(3);
vo.setNum(pitGrooveNum);
vo1.setNum(ponDingNum);
vo2.setNum(crackNum);
list.add(vo);
list.add(vo1);
list.add(vo2);
}
//若角色为部门管理员或普通用户
if(UserTypeEnum.ADMIN.getCode()== user.getType() || UserTypeEnum.ORDINARY_USER.getCode()== user.getType()){
//获取用户对应的部门
String deptId = user.getDeptId();
if(StringUtils.isEmpty(deptId)){
JsonResult.error(ListByDeptUserTypeEnum.DEPT_ID_IS_NULL.getCode(),ListByDeptUserTypeEnum.DEPT_ID_IS_NULL.getMsg());
}
//根据部门id获取部门id列表
List<String> deptIdList = deptMapper.selectAllChildListById(deptId);
if(CollectionUtil.isEmpty(deptIdList)){
return null;
}
//根据部门id列表查多条任务
List<Inspection> inspectionList = inspectionMapper.selectListByDeptIdList(deptIdList);
if(null == inspectionList){
JsonResult.error(ListByDeptUserTypeEnum.INSPECTION_LIST_IS_NULL.getCode(),ListByDeptUserTypeEnum.INSPECTION_LIST_IS_NULL.getMsg());
}
List<String> inspectionIdList = inspectionList.stream().map(o -> o.getId()).collect(Collectors.toList());
//根据任务id列表查找多条问题
List<InspectionFile> inspectionFileList = inspectionFileMapper.selectListByInspectIdList(inspectionIdList);
//根据状态类型分类
if(null == inspectionFileList){
JsonResult.error(ListByDeptUserTypeEnum.INSPECTION_TYPE_LIST_IS_NULL.getCode(),ListByDeptUserTypeEnum.INSPECTION_TYPE_LIST_IS_NULL.getMsg());
}
for (InspectionFile inspectionFile : inspectionFileList) {
if(StringUtils.isEmpty(inspectionFile.getQuestionId())){
JsonResult.error(ListByDeptUserTypeEnum.QUESTION_ID_IS_NULL.getCode(),ListByDeptUserTypeEnum.QUESTION_ID_IS_NULL.getMsg());
}
//
if(name==3){

//查找问题类型
QuestionType questionType = questionTypeMapper.selectOne(Wrappers.<QuestionType>lambdaQuery()
.eq(QuestionType::getMark, 1)
.eq(QuestionType::getId, inspectionFile.getQuestionId()));
if(ObjectUtil.isNull(questionType)){
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
}
Integer name = questionType.getName();
//1坑槽
if(name==1) {
pitGrooveNum+=1;
}else if(name==2){
//积水
ponDingNum+=1;
}else if(name==3){
//裂缝
crackNum+=1;
}

}


vo.setType(1);
vo1.setType(2);
vo2.setType(3);
vo.setNum(pitGrooveNum);
vo1.setNum(ponDingNum);
vo2.setNum(crackNum);
list.add(vo);
list.add(vo1);
list.add(vo2);

}


return null;
return JsonResult.success(list);
}



+ 320
- 320
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionVo.java Bestand weergeven

@@ -1,320 +1,320 @@
package com.tuoheng.admin.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.core.common.BaseEntity;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
* 巡检任务对象 th_inspection
*
* @team tuoheng
* @author wanjing
* @date 2022-11-16
*/
@Data
public class InspectionVo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 租户ID
*/
private String tenantId;
/**
* 部门ID
*/
private String deptId;
/**
* 部门名称
*/
private String deptName;
/**
* 巡检任务编号
*/
private String code;
/**
* 巡检任务名称
*/
private String name;
/**
* 巡检任务类型 1 临时巡检
*/
private Integer type;
/**
* 公路ID
*/
private String roadId;
/**
* 公路名称
*/
private String roadName;
/**
* 路段ID
*/
private String sectionId;
/**
* 路段名称
*/
private String sectionName;
/**
* 巡检方式类型 1 无人机 2机场 3飞手值飞
*/
private Integer inspectionType;
/**
* 巡检机场id
*/
private Integer airportId;
/**
* 巡检机场名称
*/
private String airportName;
/**
* 巡检线路id
*/
private Integer inspectionLine;
/**
* 巡检线路名称
*/
private String inspectionLineName;
/**
* 飞行设备
*/
private String equipmentId;
/**
* 飞行设备名称
*/
private String equipmentName;
/**
* 挂载设备(多选逗号","分隔)
*/
private String equipmentMountId;
/**
* 挂载设备名称(多选逗号","分隔)
*/
private String equipmentMountName;
/**
* 5G云盒ID
*/
private String cloudBoxId;
/**
* 云盒名称
*/
private String cloudBoxName;
/**
* 云盒SN号
*/
private String boxSn;
/**
* 飞手(多选逗号","分隔)
*/
private String flightHand;
/**
* 飞手姓名(多选逗号","分隔)
*/
private String flightHandName;
/**
* 计划巡检日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date inspectionTime;
/**
* 执行开始时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date executionStartTime;
/**
* 执行结束时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date executionEndTime;
/**
* 是否实时,1:实时 2:离线 默认:null
*/
private Integer isLive;
/**
* 是否正摄:1是 2否
*/
private Integer isTaken;
/**
* 是否倾斜摄影:1是 2否
*/
private Integer isTilt;
/**
* 原视频地址
*/
private String videoUrl;
/**
* AI识别后视频地址
*/
private String aiVideoUrl;
/**
* 报告地址
*/
private String reportUrl;
/**
* SRT文件地址
*/
private String srtUrl;
/**
* 任务状态 5任务待飞行 7飞行失败 10任务飞行中 15任务飞行完成
*/
private Integer status;
/**
* 算法处理状态:0默认 1待上传 2待分析 3分析中 4成功 5超时 6失败
*/
private Integer analyseStatus;
/**
*
* ai任务分析进度
*/
private BigDecimal progressbar;
/**
* 备注
*/
private String note;
/**
* 巡检时天气情况
*/
private String weather;
/**
* 飞行高度
*/
private String flyHeight;
/**
* srt文件名称
*/
private String srtName;
/**
* ai心跳更新时间
*/
private Long heartbeatTime;
/**
* 定时任务的执行状态。1:未执行,2:已执行
*/
private Integer executionStatus;
/**
* 起点经度
*/
private String startLongitude;
/**
* 起点纬度
*/
private String startLatitude;
/**
* 终点经度
*/
private String endLongitude;
/**
* 终点纬度
*/
private String endLatitude;
/**
* 联系方式
*/
private String mobile;
/**
* 巡逻地点
*/
private String patrolLocation;
/**
* 确认问题数
*/
private Integer confirmedProblemCount;
/**
* 发现问题数
*/
private Integer discoverProblemCount;
/**
* 立即执行
*/
private boolean execute;
/**
* 直播
*/
private boolean live;
/**
* 回放
*/
private boolean playback;
/**
* 问题详情
*/
private boolean problemDetails;
/**
* 问题核实
*/
private boolean problemVerify;
/**
* 重新提交
*/
private boolean resubmit;
/**
* 删除
*/
private boolean delete;
}
package com.tuoheng.admin.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.core.common.BaseEntity;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
* 巡检任务对象 th_inspection
*
* @team tuoheng
* @author wanjing
* @date 2022-11-16
*/
@Data
public class InspectionVo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 租户ID
*/
private String tenantId;
/**
* 部门ID
*/
private String deptId;
/**
* 部门名称
*/
private String deptName;
/**
* 巡检任务编号
*/
private String code;
/**
* 巡检任务名称
*/
private String name;
/**
* 巡检任务类型 1 临时巡检
*/
private Integer type;
/**
* 公路ID
*/
private String roadId;
/**
* 公路名称
*/
private String roadName;
/**
* 路段ID
*/
private String sectionId;
/**
* 路段名称
*/
private String sectionName;
/**
* 巡检方式类型 1 无人机 2机场 3飞手值飞
*/
private Integer inspectionType;
/**
* 巡检机场id
*/
private Integer airportId;
/**
* 巡检机场名称
*/
private String airportName;
/**
* 巡检线路id
*/
private Integer inspectionLine;
/**
* 巡检线路名称
*/
private String inspectionLineName;
/**
* 飞行设备
*/
private String equipmentId;
/**
* 飞行设备名称
*/
private String equipmentName;
/**
* 挂载设备(多选逗号","分隔)
*/
private String equipmentMountId;
/**
* 挂载设备名称(多选逗号","分隔)
*/
private String equipmentMountName;
/**
* 5G云盒ID
*/
private String cloudBoxId;
/**
* 云盒名称
*/
private String cloudBoxName;
/**
* 云盒SN号
*/
private String boxSn;
/**
* 飞手(多选逗号","分隔)
*/
private String flightHand;
/**
* 飞手姓名(多选逗号","分隔)
*/
private String flightHandName;
/**
* 计划巡检日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date inspectionTime;
/**
* 执行开始时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date executionStartTime;
/**
* 执行结束时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date executionEndTime;
/**
* 是否实时,1:实时 2:离线 默认:null
*/
private Integer isLive;
/**
* 是否正摄:1是 2否
*/
private Integer isTaken;
/**
* 是否倾斜摄影:1是 2否
*/
private Integer isTilt;
/**
* 原视频地址
*/
private String videoUrl;
/**
* AI识别后视频地址
*/
private String aiVideoUrl;
/**
* 报告地址
*/
private String reportUrl;
/**
* SRT文件地址
*/
private String srtUrl;
/**
* 任务状态 5任务待飞行 7飞行失败 10任务飞行中 15任务飞行完成
*/
private Integer status;
/**
* 算法处理状态:0默认 1待上传 2待分析 3分析中 4成功 5超时 6失败
*/
private Integer analyseStatus;
/**
*
* ai任务分析进度
*/
private BigDecimal progressbar;
/**
* 备注
*/
private String note;
/**
* 巡检时天气情况
*/
private String weather;
/**
* 飞行高度
*/
private String flyHeight;
/**
* srt文件名称
*/
private String srtName;
/**
* ai心跳更新时间
*/
private Long heartbeatTime;
/**
* 定时任务的执行状态。1:未执行,2:已执行
*/
private Long executionStatus;
/**
* 起点经度
*/
private String startLongitude;
/**
* 起点纬度
*/
private String startLatitude;
/**
* 终点经度
*/
private String endLongitude;
/**
* 终点纬度
*/
private String endLatitude;
/**
* 联系方式
*/
private String mobile;
/**
* 巡逻地点
*/
private String patrolLocation;
/**
* 确认问题数
*/
private Integer confirmedProblemCount;
/**
* 发现问题数
*/
private Integer discoverProblemCount;
/**
* 立即执行
*/
private boolean execute;
/**
* 直播
*/
private boolean live;
/**
* 回放
*/
private boolean playback;
/**
* 问题详情
*/
private boolean problemDetails;
/**
* 问题核实
*/
private boolean problemVerify;
/**
* 重新提交
*/
private boolean resubmit;
/**
* 删除
*/
private boolean delete;
}

+ 72
- 58
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionFileMapper.xml Bestand weergeven

@@ -1,59 +1,73 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.tuoheng.admin.mapper.InspectionFileMapper">
<resultMap type="com.tuoheng.admin.entity.InspectionFile" id="InspectionFileResult">
<result property="id" column="id" />
<result property="tenantId" column="tenant_id" />
<result property="fileCode" column="file_code" />
<result property="inspectionId" column="inspection_id" />
<result property="fileType" column="file_type" />
<result property="fileName" column="file_name" />
<result property="fileThumbnail" column="file_thumbnail" />
<result property="fileOriginal" column="file_original" />
<result property="fileImage" column="file_image" />
<result property="fileSize" column="file_size" />
<result property="latitude" column="latitude" />
<result property="longitude" column="longitude" />
<result property="location" column="location" />
<result property="gaodeLongitude" column="gaode_longitude" />
<result property="gaodeLatitude" column="gaode_latitude" />
<result property="gaodeAddress" column="gaode_address" />
<result property="questionId" column="question_id" />
<result property="source" column="source" />
<result property="questionName" column="question_name" />
<result property="content" column="content" />
<result property="questionDesc" column="question_desc" />
<result property="status" column="status" />
<result property="checkUser" column="check_user" />
<result property="checkTime" column="check_time" />
<result property="createUser" column="create_user" />
<result property="createTime" column="create_time" />
<result property="updateUser" column="update_user" />
<result property="updateTime" column="update_time" />
<result property="mark" column="mark" />
</resultMap>
<sql id="selectThInspectionFileVo">
select id, tenant_id, file_code, inspection_id, file_type, file_name, file_thumbnail, file_original, file_image, file_size, latitude, longitude, location, gaode_longitude, gaode_latitude, gaode_address, question_id, source, question_name, content, question_desc, status, check_user, check_time, create_user, create_time, update_user, update_time, mark from th_inspection_file
</sql>
<update id="deleteLogicByMap" parameterType="hashmap">
update th_inspection_file
<trim prefix="SET" suffixOverrides=",">
<if test="updateUser != null and updateUser != ''"> update_user = #{updateUser}, </if>
<if test="updateTime != null"> update_time = #{updateTime}, </if>
<if test="mark != null"> mark = #{mark},</if>
</trim>
<where>
<if test="inspectionId != null and inspectionId != ''"> inspection_id = #{inspectionId} </if>
</where>
</update>
<delete id="deleteByInspectionId" parameterType="String">
delete from th_inspection_file where inspection_id = #{id}
</delete>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.tuoheng.admin.mapper.InspectionFileMapper">
<resultMap type="com.tuoheng.admin.entity.InspectionFile" id="InspectionFileResult">
<result property="id" column="id" />
<result property="tenantId" column="tenant_id" />
<result property="fileCode" column="file_code" />
<result property="inspectionId" column="inspection_id" />
<result property="fileType" column="file_type" />
<result property="fileName" column="file_name" />
<result property="fileThumbnail" column="file_thumbnail" />
<result property="fileOriginal" column="file_original" />
<result property="fileImage" column="file_image" />
<result property="fileSize" column="file_size" />
<result property="latitude" column="latitude" />
<result property="longitude" column="longitude" />
<result property="location" column="location" />
<result property="gaodeLongitude" column="gaode_longitude" />
<result property="gaodeLatitude" column="gaode_latitude" />
<result property="gaodeAddress" column="gaode_address" />
<result property="questionId" column="question_id" />
<result property="source" column="source" />
<result property="questionName" column="question_name" />
<result property="content" column="content" />
<result property="questionDesc" column="question_desc" />
<result property="status" column="status" />
<result property="checkUser" column="check_user" />
<result property="checkTime" column="check_time" />
<result property="createUser" column="create_user" />
<result property="createTime" column="create_time" />
<result property="updateUser" column="update_user" />
<result property="updateTime" column="update_time" />
<result property="mark" column="mark" />
</resultMap>

<sql id="Base_Column_List">
id, tenant_id, file_code, inspection_id, file_type, file_name, file_thumbnail, file_original, file_image, file_size, latitude, longitude, location, gaode_longitude, gaode_latitude, gaode_address, question_id, source, question_name, content, question_desc, status, check_user, check_time, create_user, create_time, update_user, update_time, mark
</sql>

<sql id="selectThInspectionFileVo">
select id, tenant_id, file_code, inspection_id, file_type, file_name, file_thumbnail, file_original, file_image, file_size, latitude, longitude, location, gaode_longitude, gaode_latitude, gaode_address, question_id, source, question_name, content, question_desc, status, check_user, check_time, create_user, create_time, update_user, update_time, mark from th_inspection_file
</sql>

<update id="deleteLogicByMap" parameterType="hashmap">
update th_inspection_file
<trim prefix="SET" suffixOverrides=",">
<if test="updateUser != null and updateUser != ''"> update_user = #{updateUser}, </if>
<if test="updateTime != null"> update_time = #{updateTime}, </if>
<if test="mark != null"> mark = #{mark},</if>
</trim>
<where>
<if test="inspectionId != null and inspectionId != ''"> inspection_id = #{inspectionId} </if>
</where>
</update>

<delete id="deleteByInspectionId" parameterType="String">
delete from th_inspection_file where inspection_id = #{id}
</delete>

<select id="selectListByInspectIdList" resultType="list" resultMap="InspectionFileResult">
select <include refid="Base_Column_List"/>
from th_inspection_file
where mark = 1 and status in(20,25) and
inspection_id in
<foreach collection="list" item="inspectionId" separator="," open="(" close=")">
#{inspectionId}
</foreach>
</select>

</mapper>

+ 20
- 0
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml Bestand weergeven

@@ -60,6 +60,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="mark" column="mark" />
</resultMap>
<sql id="Base_Column_list">
id, tenant_id, dept_id, code, name, type, road_id, road_name, section_id, section_name, inspection_type,
airport_id, airport_name, inspection_line, inspection_line_name, equipment_id, equipment_name, equipment_mount_id,
equipment_mount_name, cloud_box_id, cloud_box_name, box_sn, flight_hand, flight_hand_name, inspection_time,
execution_start_time, execution_end_time, is_live, is_taken, is_tilt, video_url, ai_video_url, report_url, srt_url,
status, analyse_status, progressbar, note, weather, fly_height, srt_name, heartbeat_time, execution_status,
start_longitude, start_latitude, end_longitude, end_latitude, mobile, patrol_location,
create_user, create_time, update_user, update_time, mark
</sql>

<sql id="selectInspectionVo">
select id, tenant_id, dept_id, code, name, type, road_id, road_name, section_id, section_name, inspection_type,
@@ -111,6 +120,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by i.update_time desc
</select>

<!-- 根据部门id列表查多条任务-->
<select id="selectListByDeptIdList" resultType="list" resultMap="InspectionResult">
select <include refid="Base_Column_list"/>
from th_inspection
where dept_id in
<foreach collection="list" item="deptId" separator="," open="(" close=")">
#{deptId}
</foreach>
</select>



<update id="update" parameterType="com.tuoheng.admin.entity.Inspection">
update th_inspection

Laden…
Annuleren
Opslaan