src/main/java/com/yssh/controller/SuYuanController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/yssh/service/LocationService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/LocationMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/VocValsMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/yssh/controller/SuYuanController.java
@@ -3,6 +3,7 @@ import com.yssh.entity.*; import com.yssh.service.CommonService; import com.yssh.service.VocValsService; import com.yssh.utils.DateUtils; import com.yssh.utils.StringUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -146,7 +147,8 @@ @ApiOperationSupport(order = 11) @GetMapping("/selectVocByTime") public Result selectVocByTime(@RequestParam(value = "date", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date date) { List<VocVals> list = vocValsService.selectByTime(format.format(date)); String time = DateUtils.getYyyyMmDdHhMmSs(date); List<VocVals> list = vocValsService.selectByTime(time); return Result.OK(list); } src/main/java/com/yssh/service/LocationService.java
@@ -50,6 +50,7 @@ } List<Location> list = new ArrayList<>(); // 1米=0.0000089932 for (Location loc : vocAddrs) { if (Math.abs(loc.getLon() - x) <= 0.00009 && Math.abs(loc.getLat() - y) <= 0.00009) { list.add(loc); src/main/resources/mapper/LocationMapper.xml
@@ -16,9 +16,9 @@ <select id="selectByXY" resultMap="locationResult"> <include refid="locationSql"></include> <where> lon between (#{x} - 0.000045) and (#{x} + 0.000045) lon between (#{x} - 0.00009) and (#{x} + 0.00009) and lat between (#{y} - 0.000045) and (#{y} + 0.000045) lat between (#{y} - 0.00009) and (#{y} + 0.00009) </where> </select> src/main/resources/mapper/VocValsMapper.xml
@@ -14,7 +14,7 @@ select a.x, a.y, format(a.val, 2) "val", b.addr from voc_vals a inner join voc_addr b on a.x = b.x and a.y = b.y where date_format(a.create_time, '%Y%m%d%H') = ${time} where a.create_time = #{time} and a.val > (select jcyj from alert_config); </select>