daixiantong il y a 4 ans
Parent
révision
49e7b2498c
6 fichiers modifiés avec 53 ajouts et 4 suppressions
  1. +2
    -1
      src/main/java/com/taauav/admin/mapper/TauvInspectDriverMapper.xml
  2. +1
    -1
      src/main/java/com/taauav/admin/service/impl/TauvWaterTrendServiceImpl.java
  3. +1
    -1
      src/main/java/com/taauav/front/controller/IndexInspectController.java
  4. +18
    -0
      src/main/java/com/taauav/front/service/impl/UserInspectDriverServiceImpl.java
  5. +23
    -0
      src/main/java/com/taauav/front/vo/IndexInspectFileVo.java
  6. +8
    -1
      src/main/java/com/taauav/front/vo/IndexInspectListVo.java

+ 2
- 1
src/main/java/com/taauav/admin/mapper/TauvInspectDriverMapper.xml Voir le fichier

@@ -94,7 +94,8 @@
<!-- 指挥大屏 任务管理 列表数据 -->
<select id="getIndexInspectList" resultType="com.taauav.front.vo.IndexInspectListVo">
SELECT d.id, d.`driver_name` AS `driverName`, c.`name` AS `areaName`, d.`execution_time` AS `inspectTime`,
r.`start_point` AS `startPoint`, r.`end_point` AS `endPoint`, d.`status`, e.`live_url` AS `liveUrl`, d.driver_id
r.`start_point` AS `startPoint`, r.`end_point` AS `endPoint`, d.`status`, e.`live_url` AS `liveUrl`, d.driver_id,
d.driver_video
FROM tauv_inspect_driver AS d
LEFT JOIN tauv_driver AS r ON d.`driver_id` = r.`id`
LEFT JOIN sys_city AS c ON d.`driver_area` = c.`id`

+ 1
- 1
src/main/java/com/taauav/admin/service/impl/TauvWaterTrendServiceImpl.java Voir le fichier

@@ -157,7 +157,7 @@ public class TauvWaterTrendServiceImpl extends BaseServiceImpl<TauvWaterTrendMap
QueryWrapper wrapper = new QueryWrapper();
wrapper.eq("driver_area", city.getId());
wrapper.eq("driver_id", driver.getId());
wrapper.eq("forecast_time", forecastTime + "-01");
wrapper.eq("forecast_time", forecastTime + "-01 00:00:00");
wrapper.last("limit 1");
TauvWaterTrend waterTrend = getOne(wrapper);
if (waterTrend == null) {

+ 1
- 1
src/main/java/com/taauav/front/controller/IndexInspectController.java Voir le fichier

@@ -59,7 +59,7 @@ public class IndexInspectController {
* @return
*/
@PostMapping("/addTask")
public Response addTask(@RequestBody @Valid TauvInspect inspect , BindingResult bindingResult) {
public Response addTask(@RequestBody TauvInspect inspect , BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
List<FieldError> errorList = bindingResult.getFieldErrors();
String msg = bindingResult.getFieldError().getDefaultMessage();

+ 18
- 0
src/main/java/com/taauav/front/service/impl/UserInspectDriverServiceImpl.java Voir le fichier

@@ -21,6 +21,7 @@ import com.taauav.front.dto.IndexInspectDto;
import com.taauav.front.mapper.UserAdminMapper;
import com.taauav.front.service.IUserAdminService;
import com.taauav.front.service.IUserInspectDriverService;
import com.taauav.front.vo.IndexInspectFileVo;
import com.taauav.front.vo.IndexInspectListVo;
import com.taauav.front.vo.UserAdminVo;
import org.springframework.beans.BeanUtils;
@@ -352,6 +353,23 @@ public class UserInspectDriverServiceImpl extends BaseServiceImpl<TauvInspectDri
for (IndexInspectListVo item : inspectList) {
// 状态
item.setStatusText(FunctionUtils.getArrayText(item.getStatus().toString(), item.statusList()));
// 图片
List<TauvInspectFile> fileList = inspectFileService.getInspectFileListByInspectDriverId(item.getId());
List<IndexInspectFileVo> fileVoList = new ArrayList<>();
if (fileList != null && fileList.size() > 0) {
for (TauvInspectFile dt : fileList) {
if (!StringUtils.isEmpty(dt.getThumbImg()) && !dt.getThumbImg().contains("http")) {
dt.setThumbImg(uploadUrl + dt.getThumbImg());
}
if (!StringUtils.isEmpty(dt.getOriginalImg()) && !dt.getOriginalImg().contains("http")) {
dt.setOriginalImg(uploadUrl + dt.getOriginalImg());
}
IndexInspectFileVo fileVo = new IndexInspectFileVo();
BeanUtils.copyProperties(dt, fileVo, IndexInspectFileVo.class);
fileVoList.add(fileVo);
}
}
item.setImageList(fileVoList);
}
}
return response.success(inspectList);

+ 23
- 0
src/main/java/com/taauav/front/vo/IndexInspectFileVo.java Voir le fichier

@@ -0,0 +1,23 @@
package com.taauav.front.vo;

import lombok.Data;

/**
* 指挥大屏-任务管理-航拍资料-拍摄图片地址实体类
*
* @author daixiantong
* @date 2020-06-01
*/
@Data
public class IndexInspectFileVo {

/**
* 缩略图地址
*/
private String thumbImg;

/**
* 原图地址
*/
private String originalImg;
}

+ 8
- 1
src/main/java/com/taauav/front/vo/IndexInspectListVo.java Voir le fichier

@@ -3,7 +3,6 @@ package com.taauav.front.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.taauav.admin.entity.TauvDriverPoint;
import lombok.Data;

import java.util.Date;
@@ -62,6 +61,14 @@ public class IndexInspectListVo {
* 直播地址
*/
private String liveUrl;
/**
* 航线视频地址
*/
private String driverVideo;
/**
* 图片地址数组
*/
private List<IndexInspectFileVo> imageList;

public Map<String, String> statusList() {
Map<String, String> map = new HashMap<>();

Chargement…
Annuler
Enregistrer