@@ -30,6 +30,14 @@ public class TauvInspectPhoto extends Entity { | |||
* 正摄图地址 | |||
*/ | |||
private String photoUrl; | |||
/** | |||
* 纬度 | |||
*/ | |||
private String latitude; | |||
/** | |||
* 经度 | |||
*/ | |||
private String longitude; | |||
/** | |||
* 上传人id | |||
*/ |
@@ -77,4 +77,12 @@ public class TauvWaterSpectrum extends Entity { | |||
* 浊度多光谱路径 | |||
*/ | |||
private String tubPic; | |||
/** | |||
* 纬度 | |||
*/ | |||
private String latitude; | |||
/** | |||
* 经度 | |||
*/ | |||
private String longitude; | |||
} |
@@ -48,11 +48,10 @@ public class TauvInspectPhotoServiceImpl extends BaseServiceImpl<TauvInspectPhot | |||
if (inspectPhoto == null || inspectPhoto.getId() == null) { | |||
return response.failure("id不能为空"); | |||
} | |||
if (StringUtils.isEmpty(inspectPhoto.getPhotoUrl())) { | |||
return response.failure("请先上传正摄图"); | |||
if (!StringUtils.isEmpty(inspectPhoto.getPhotoUrl())) { | |||
inspectPhoto.setUploadTime(DateUtil.now()); | |||
inspectPhoto.setUploadUser(ShiroUtils.getAdminId()); | |||
} | |||
inspectPhoto.setUploadTime(DateUtil.now()); | |||
inspectPhoto.setUploadUser(ShiroUtils.getAdminId()); | |||
updateById(inspectPhoto); | |||
return response.success("操作成功"); | |||
} |
@@ -84,7 +84,35 @@ | |||
<!-- 获取指挥大屏问题清单-问题分页列表数据 --> | |||
<select id="selectIndexPageList" resultType="com.taauav.front.vo.IndexQuestionListVo"> | |||
select q.*, d.inspect_no as `inspectNo`, f.thumb_img as `imgUrl`, d.driver_area as `driverArea`, t.name as `areaName`, | |||
d.driver_name as `driverName`, d.execution_time as `inspectTime`, o.content as `questionType`, f.location, | |||
f.latitude, f.longitude,a.realname as `createUserName`, b.realname as `assignUserName`, c.realname as `handlerUserName`, | |||
a1.name as `createUserDept`,b1.name as `assignUserDept`,c1.name as `handlerUserDept`, f.original_img as `originUrl` | |||
from tauv_inspect_question as q | |||
left join tauv_inspect_driver as d on q.inspect_driver_id = d.id | |||
left join tauv_inspect_file as f on q.inspect_file_id = f.id | |||
left join tauv_question_options as o on f.question_id = o.id | |||
left join sys_city as t on d.driver_area = t.id | |||
left join user_admin as a on q.create_user = a.id | |||
left join sys_city as a1 on a.driver_area = a1.id | |||
left join user_admin as b on q.assign_user = b.id | |||
left join sys_city as b1 on b.driver_area = b1.id | |||
left join user_admin as c on q.handler_user = c.id | |||
left join sys_city as c1 on c.driver_area = c1.id | |||
where q.mark = 1 and d.mark = 1 and f.mark = 1 and o.mark = 1 | |||
<if test="param != null and param.driverId != null and param.driverId > 0"> | |||
and d.driver_name like concat('%', #{param.driverName}, '%') | |||
</if> | |||
<if test="param != null and param.startTime != null and param.entTime != null"> | |||
and d.execution_time between #{param.startTime} and #{param.endTime} | |||
</if> | |||
<if test="param != null and param.driverArea != null and param.driverArea > 0"> | |||
and d.driverArea = #{param.driverArea} | |||
</if> | |||
<if test="param != null and param.status != null and param.status > 0"> | |||
and q.status = #{param.status} | |||
</if> | |||
order by q.id desc | |||
</select> | |||
</mapper> |
@@ -4,7 +4,7 @@ | |||
<!-- 获取多光谱数据列表 --> | |||
<select id="getWaterSpectrumList" parameterType="com.taauav.front.query.UserWaterSpectrumQuery" resultType="com.taauav.front.vo.userwaterspectrum.UserWaterSpectrumListVo"> | |||
SELECT s.id,s.area_name,d.inspect_no,d.num,d.driver_id,d.driver_name,i.inspect_time,s.cod_pic,s.nh3n_pic,s.tp_pic,s.tn_pic,s.do_pic,s.tub_pic | |||
SELECT s.id,s.area_name,d.inspect_no,d.num,d.driver_id,d.driver_name,i.inspect_time,s.cod_pic,s.nh3n_pic,s.tp_pic,s.tn_pic,s.do_pic,s.tub_pic,s.latitude,s.longitude | |||
FROM tauv_water_spectrum s | |||
INNER JOIN tauv_inspect_driver AS d ON s.inspect_driver_id = d.id | |||
INNER JOIN tauv_inspect AS i ON i.id = d.inspect_id |
@@ -2,7 +2,9 @@ package com.taauav.front.service.impl; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.taauav.admin.entity.SysCity; | |||
import com.taauav.admin.service.ISysCityService; | |||
import com.taauav.admin.vo.TauvInspectQuestionVo; | |||
import com.taauav.common.bean.Response; | |||
import com.taauav.common.core.mps.BaseQuery; | |||
import com.taauav.common.service.impl.BaseServiceImpl; | |||
@@ -55,6 +57,8 @@ public class UserInspectQuestionServiceImpl extends BaseServiceImpl<UserInspectQ | |||
private String uploadUrl; | |||
@Value("${file.uploadFolder}") | |||
private String uploadFolder; | |||
@Value("${server.IMAGE_URL}") | |||
private String imageUrl; | |||
/** | |||
* 获取巡检问题列表 | |||
@@ -248,6 +252,19 @@ public class UserInspectQuestionServiceImpl extends BaseServiceImpl<UserInspectQ | |||
public Response selectIndexPage(IndexQuestionDto indexQuestionDto, BaseQuery query) { | |||
IPage page = new Page(query.getPage(), query.getPageSize()); | |||
IPage<IndexQuestionListVo> list = baseMapper.selectIndexPageList(page, indexQuestionDto); | |||
return null; | |||
if (list.getRecords().size() > 0) { | |||
for (IndexQuestionListVo item : list.getRecords()) { | |||
// 状态描述 | |||
item.setStatusText(FunctionUtils.getArrayText(item.getStatus().toString(), item.statusList())); | |||
// 图片路径处理 | |||
if (com.taauav.common.util.StringUtils.isNotEmpty(item.getImgUrl()) && !item.getImgUrl().contains("http")) { | |||
item.setImgUrl(imageUrl + item.getImgUrl()); | |||
} | |||
if (com.taauav.common.util.StringUtils.isNotEmpty(item.getOriginUrl()) && !item.getOriginUrl().contains("http")) { | |||
item.setOriginUrl(imageUrl + item.getOriginUrl()); | |||
} | |||
} | |||
} | |||
return response.success(list); | |||
} | |||
} |
@@ -5,6 +5,8 @@ import com.taauav.front.entity.UserInspectQuestion; | |||
import lombok.Data; | |||
import java.util.Date; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
/** | |||
* 指挥大屏-问题清单 返回结果实体类 | |||
@@ -94,4 +96,16 @@ public class IndexQuestionListVo extends UserInspectQuestion { | |||
* 处理人部门 | |||
*/ | |||
private String handlerUserDept; | |||
/** | |||
* 状态数组 | |||
* @return | |||
*/ | |||
public Map<String, String> statusList() { | |||
Map<String, String> map = new HashMap<>(); | |||
map.put("1", "待指派"); | |||
map.put("2", "待处理"); | |||
map.put("3", "已完成"); | |||
return map; | |||
} | |||
} |
@@ -73,4 +73,13 @@ public class UserWaterSpectrumListVo { | |||
*/ | |||
private String tubPic; | |||
/** | |||
* 纬度 | |||
*/ | |||
private String latitude; | |||
/** | |||
* 经度 | |||
*/ | |||
private String longitude; | |||
} |