src/main/java/com/yssh/controller/SuYuanController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/yssh/dao/QxshMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/yssh/entity/Qxsh.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/yssh/service/ISuYuanService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/yssh/service/impl/SuYuanServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapping/QxshMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/yssh/controller/SuYuanController.java
@@ -1,6 +1,6 @@ package com.yssh.controller; import com.yssh.entity.MonitorPointPosition; import com.yssh.entity.*; import com.yssh.service.ICommonService; import com.yssh.utils.StringUtils; import io.swagger.annotations.Api; @@ -18,9 +18,6 @@ import org.springframework.web.bind.annotation.RestController; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.yssh.entity.SuYuan2d; import com.yssh.entity.SuYuan3d; import com.yssh.entity.SuYuanMonitorData; import com.yssh.service.ISuYuanService; import com.yssh.utils.Result; @@ -129,4 +126,13 @@ return Result.OK(point); } @ApiOperation(value = "æ ¹æ®Qxshå¼", notes = "æ ¹æ®Qxshå¼") @ApiOperationSupport(order = 10) @GetMapping("/queryQxsh") public Result queryQxsh(@RequestParam(value = "date", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date date) { List<Qxsh> list = suYuanService.queryQxsh(date); return Result.OK(list); } } src/main/java/com/yssh/dao/QxshMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,16 @@ package com.yssh.dao; import com.yssh.entity.Qxsh; import org.apache.ibatis.annotations.Mapper; import java.util.List; /** * @author WWW * @date 2023-05-18 * QxshMapper */ @Mapper public interface QxshMapper { public List<Qxsh> selectByTime(String time); } src/main/java/com/yssh/entity/Qxsh.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,83 @@ package com.yssh.entity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @author WWW * @date 2023-05-18 * qxsh */ @Data @ApiModel(value = "Qxsh",description = "Qxsh") public class Qxsh { @ApiModelProperty(value = "主é®") private Integer id; @ApiModelProperty(value = "åç§°") private String name; @ApiModelProperty(value = "ç»åº¦") private Double lon; @ApiModelProperty(value = "纬度") private Double lat; @ApiModelProperty(value = "æ°å¼") private Double value; @ApiModelProperty(value = "æ¶é´") private String time; public Qxsh() { } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Double getLon() { return lon; } public void setLon(Double lon) { this.lon = lon; } public Double getLat() { return lat; } public void setLat(Double lat) { this.lat = lat; } public Double getValue() { return value; } public void setValue(Double value) { this.value = value; } public String getTime() { return time; } public void setTime(String time) { this.time = time; } } src/main/java/com/yssh/service/ISuYuanService.java
@@ -4,11 +4,7 @@ import java.util.List; import java.util.Map; import com.yssh.entity.SuYuan; import com.yssh.entity.SuYuan2d; import com.yssh.entity.SuYuan3d; import com.yssh.entity.SuYuanMonitorData; import com.yssh.entity.*; public interface ISuYuanService { public Integer isTableExists(String tableName); @@ -34,4 +30,6 @@ //public List<Temporary> temporary(String name, Date date); public int updateVocsName(Date date, String id, String vocsName); public List<Qxsh> queryQxsh(Date date); } src/main/java/com/yssh/service/impl/SuYuanServiceImpl.java
@@ -10,6 +10,8 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; import com.yssh.dao.QxshMapper; import com.yssh.entity.*; import com.yssh.utils.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -20,14 +22,6 @@ import com.yssh.dao.DictRecordMapper; import com.yssh.dao.FeedbackMapper; import com.yssh.dao.SuYuanMapper; import com.yssh.entity.DictRecord; import com.yssh.entity.DistanceSuYuan; import com.yssh.entity.FeedbackDetail; import com.yssh.entity.MonitorPointPosition; import com.yssh.entity.SuYuan; import com.yssh.entity.SuYuan2d; import com.yssh.entity.SuYuan3d; import com.yssh.entity.SuYuanMonitorData; import com.yssh.service.IAsyncService; import com.yssh.service.ICommonService; import com.yssh.service.ISuYuanService; @@ -53,6 +47,9 @@ @Resource private FeedbackMapper feedbackMapper; @Resource private QxshMapper qxshMapper; private final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHH"); @@ -262,4 +259,11 @@ return suYuanMapper.updateVocsName(table, id, vocsName); } @Override public List<Qxsh> queryQxsh(Date date) { String time = dateFormat.format(date); return qxshMapper.selectByTime(time); } } src/main/resources/mapping/QxshMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.yssh.dao.QxshMapper"> <select id="selectByTime" resultType="com.yssh.entity.Qxsh"> select id, name, lon, lat, value, time from yssh_qxsh where time =#{time} order by name; </select> </mapper>