Browse Source

工作台任务列表添加sn号返参

tags/v1.3.1
chengwang 1 year ago
parent
commit
61272a817c
5 changed files with 18 additions and 10 deletions
  1. +0
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java
  2. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Inspection.java
  3. +4
    -7
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionCardListService.java
  4. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionCardVo.java
  5. +4
    -2
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml

+ 0
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java View File

*/ */
@GetMapping("/list") @GetMapping("/list")
public JsonResult inspectionCardList(){ public JsonResult inspectionCardList(){
// log.info("进入查询巡检任务列表接口");
return iInspectionService.inspectionCardList(); return iInspectionService.inspectionCardList();
} }



+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Inspection.java View File

*/ */
private Long airportId; private Long airportId;


/**
* 机场sn
*/
private String sn;

/** /**
* 巡检无人机id * 巡检无人机id
*/ */

+ 4
- 7
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionCardListService.java View File

*/ */
public JsonResult getInspectionCardList() { public JsonResult getInspectionCardList() {
//根据当前登录用户获取数据权限信息 //根据当前登录用户获取数据权限信息
String userId = CurrentUserUtil.getUserId();
User user = CurrentUserUtil.getUserInfo();
String userId = user.getId();
if(StringUtils.isEmpty(userId)){ if(StringUtils.isEmpty(userId)){
return JsonResult.error(QueryUserInfoByIdCodeEnum.USER_ID_IS_NULL.getCode() return JsonResult.error(QueryUserInfoByIdCodeEnum.USER_ID_IS_NULL.getCode()
,QueryUserInfoByIdCodeEnum.USER_ID_IS_NULL.getMsg()); ,QueryUserInfoByIdCodeEnum.USER_ID_IS_NULL.getMsg());
} }
String tenantId = CurrentUserUtil.getTenantId();
String tenantId = user.getTenantId();
if(StringUtils.isEmpty(tenantId)){ if(StringUtils.isEmpty(tenantId)){
return JsonResult.error(QueryUserInfoByIdCodeEnum.USER_TENANT_ID_NULL.getCode() return JsonResult.error(QueryUserInfoByIdCodeEnum.USER_TENANT_ID_NULL.getCode()
,QueryUserInfoByIdCodeEnum.USER_TENANT_ID_NULL.getMsg()); ,QueryUserInfoByIdCodeEnum.USER_TENANT_ID_NULL.getMsg());
} }
Tenant tenant = tenantMapper.selectById(tenantId); Tenant tenant = tenantMapper.selectById(tenantId);
User user = userMapper.selectById(userId);
if(ObjectUtil.isNull(user)){
return JsonResult.error(QueryUserInfoByIdCodeEnum.USER_IS_NOT_EXIST.getCode(),
QueryUserInfoByIdCodeEnum.USER_IS_NOT_EXIST.getMsg());
}

//部门 //部门
Dept dept = deptMapper.selectById(user.getDeptId()); Dept dept = deptMapper.selectById(user.getDeptId());
if(ObjectUtil.isNull(dept)){ if(ObjectUtil.isNull(dept)){

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionCardVo.java View File

*/ */
private String accidentId; private String accidentId;


/**
* 机场sn号
*/
private String sn;

} }

+ 4
- 2
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml View File

<result property="legName" column="leg_name" /> <result property="legName" column="leg_name" />
<result property="inspectionType" column="inspection_type" /> <result property="inspectionType" column="inspection_type" />
<result property="recordId" column="record_id" /> <result property="recordId" column="record_id" />
<result property="sn" column="sn" />
<result property="airportId" column="airport_id" /> <result property="airportId" column="airport_id" />
<result property="airportName" column="airport_name" /> <result property="airportName" column="airport_name" />
<result property="droneId" column="drone_id" /> <result property="droneId" column="drone_id" />


<sql id="Base_Column_list"> <sql id="Base_Column_list">
id, tenant_id, dept_id, code, name, type, channel_id, channel_name, leg_id, leg_name, inspection_type, id, tenant_id, dept_id, code, name, type, channel_id, channel_name, leg_id, leg_name, inspection_type,
record_id, airport_id, airport_name, drone_id, inspection_line, inspection_line_name, equipment_id, equipment_name, equipment_mount_id,
record_id, airport_id, sn, airport_name, drone_id, 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, 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, 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, status, analyse_status, progressbar, note, weather, fly_height, srt_name, heartbeat_time, execution_status,


<sql id="selectInspectionVo"> <sql id="selectInspectionVo">
select id, tenant_id, dept_id, code, name, type, channel_id, channel_name, leg_id, leg_name, inspection_type, select id, tenant_id, dept_id, code, name, type, channel_id, channel_name, leg_id, leg_name, inspection_type,
record_id, airport_id, airport_name, drone_id, inspection_line, inspection_line_name, equipment_id, equipment_name, equipment_mount_id,
record_id, airport_id, sn, airport_name, drone_id, 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, 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, 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, status, analyse_status, progressbar, note, weather, fly_height, srt_name, heartbeat_time, execution_status,
<if test="legName != null">leg_name = #{legName},</if> <if test="legName != null">leg_name = #{legName},</if>
<if test="recordId != null"> record_id = #{RecordId},</if> <if test="recordId != null"> record_id = #{RecordId},</if>
<if test="airportId != null">airport_id = #{airportId},</if> <if test="airportId != null">airport_id = #{airportId},</if>
<if test="sn != null">sn = #{sn},</if>
<if test="airportName != null">airport_name = #{airportName},</if> <if test="airportName != null">airport_name = #{airportName},</if>
<if test="droneId != null"> drone_id = #{droneId},</if> <if test="droneId != null"> drone_id = #{droneId},</if>
<if test="inspectionLine != null">inspection_line = #{inspectionLine},</if> <if test="inspectionLine != null">inspection_line = #{inspectionLine},</if>

Loading…
Cancel
Save