牧羊人 vor 4 Jahren
Ursprung
Commit
b9320a5533
3 geänderte Dateien mit 5 neuen und 37 gelöschten Zeilen
  1. +1
    -9
      src/main/java/com/taauav/front/mapper/UserWaterSpectrumMapper.java
  2. +0
    -23
      src/main/java/com/taauav/front/mapper/UserWaterSpectrumMapper.xml
  3. +4
    -5
      src/main/java/com/taauav/front/service/impl/UserWaterSpectrumServiceImpl.java

+ 1
- 9
src/main/java/com/taauav/front/mapper/UserWaterSpectrumMapper.java Datei anzeigen

@@ -19,17 +19,9 @@ import java.util.List;
*/
public interface UserWaterSpectrumMapper extends BaseMapper<TauvWaterSpectrum> {

/**
* 获取多光谱数据列表
*
* @param page 分页
* @param query 查询条件
* @return
*/
List<UserWaterSpectrumListVo> getWaterSpectrumList(IPage<UserWaterSpectrumListVo> page, @RequestParam("query") UserWaterSpectrumQuery query);

/**
* 获取河湖最新的多光谱图
*
* @param driverId
* @return
*/

+ 0
- 23
src/main/java/com/taauav/front/mapper/UserWaterSpectrumMapper.xml Datei anzeigen

@@ -2,29 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.taauav.front.mapper.UserWaterSpectrumMapper">

<!-- 获取多光谱数据列表 -->
<select id="getWaterSpectrumList" parameterType="com.taauav.front.query.UserWaterSpectrumQuery" resultType="com.taauav.front.vo.userwaterspectrum.UserWaterSpectrumListVo">
SELECT s.* 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
WHERE s.`status`=1 AND s.mark=1 AND d.mark=1 AND i.mark=1
<if test="query.inspectNo != null">
and d.inspect_no like concat('%', #{query.inspectNo}, '%')
</if>
<if test="query.driverName != null">
and d.driver_name like concat('%', #{query.driverName}, '%')
</if>
<if test="query.inspectTime != null and query.inspectTime !=''">
and i.inspect_time between #{query.inspectStartTime} and #{query.inspectEndTime}
</if>
<if test="query.driverAreaList != null"> and d.driver_area in
<foreach collection="query.driverAreaList" item="area" open="(" close=")" separator=",">
#{area}
</foreach>
</if>
ORDER BY s.id DESC
</select>

<select id="selectLastSpectrumByDriver" resultType="com.taauav.admin.entity.TauvWaterSpectrum">
SELECT * FROM `tauv_water_spectrum` WHERE mark = 1 AND driver_id = #{driverId}
AND (cod_pic != '' OR nh3n_pic != '' OR tp_pic != '' OR tn_pic != '' OR do_pic != '' OR tub_pic != '')

+ 4
- 5
src/main/java/com/taauav/front/service/impl/UserWaterSpectrumServiceImpl.java Datei anzeigen

@@ -69,15 +69,14 @@ public class UserWaterSpectrumServiceImpl extends BaseServiceImpl<UserWaterSpect
// 加入当前选中的区划
cityIds.add(query.getDriverArea());
BigInteger[] integers = cityIds.toArray(new BigInteger[cityIds.size()]);
// query.setDriverAreaList(integers);
queryWrapper.in("area_id", integers);
}
// 巡检时间处理
if (!StringUtils.isEmpty(query.getInspectTime())) {
String startTime = FunctionUtils.formatTime(Integer.valueOf(query.getInspectTime()), "yyyy-MM-dd") + " 0:00:00";
String endTime = FunctionUtils.formatTime(Integer.valueOf(query.getInspectTime()), "yyyy-MM-dd") + " 23:59:59";
// query.setInspectStartTime(startTime);
// query.setInspectEndTime(endTime);
String[] strings = query.getInspectTime().split(" ~ ");
String startTime = strings[0] + " 0:00:00";
String endTime = strings[1] + " 23:59:59";
queryWrapper.between("inspect_time", startTime, endTime);
}
queryWrapper.eq("mark", 1);

Laden…
Abbrechen
Speichern