燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2023-07-06 ce0aaddd0fc04e69c530a545de25a7a4d7f6fab3
1
已修改6个文件
29 ■■■■ 文件已修改
src/main/java/com/yssh/controller/SuYuanController.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/dao/SuYuanMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/run/InitDataRunner.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/service/ISuYuanService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/service/impl/SuYuanServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapping/SuYuanMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/controller/SuYuanController.java
@@ -175,8 +175,15 @@
        return Result.OK(suYuanService.selectSuYuan700ById(id, date));
    }
    @ApiOperation(value = "根据经纬度查询地名", notes = "根据经纬度查询地名")
    @ApiOperation(value = "根据ID和日期查询溯源46表", notes = "根据ID和日期查询溯源46表")
    @ApiOperationSupport(order = 15)
    @GetMapping("/selectSuYuan46ById")
    public Result selectSuYuan46ById(@RequestParam(value = "id", required = true) String id, @RequestParam(value = "date", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date date) {
        return Result.OK(suYuanService.selectSuYuan46ById(id, date));
    }
    @ApiOperation(value = "根据经纬度查询地名", notes = "根据经纬度查询地名")
    @ApiOperationSupport(order = 16)
    @GetMapping("/selectAddrByXY")
    public Result selectAddrByXY(@RequestParam(value = "x", required = true) double x, @RequestParam(value = "y", required = true) double y) {
        return Result.OK(suYuanService.selectAddrByXY(x, y));
src/main/java/com/yssh/dao/SuYuanMapper.java
@@ -41,4 +41,6 @@
    int updateVocsName(String table, String id, String vocsName);
    SuYuan700 selectSuYuan700ById(@Param("id") String id, @Param("time") String time);
    SuYuan700 selectSuYuan46ById(@Param("id") String id, @Param("time") String time);
}
src/main/java/com/yssh/run/InitDataRunner.java
@@ -3,8 +3,6 @@
import com.yssh.scheduled.ReadCsvTask;
import com.yssh.service.impl.WarningAnalyseServiceImpl;
import com.yssh.utils.CacheUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
src/main/java/com/yssh/service/ISuYuanService.java
@@ -37,5 +37,7 @@
    public SuYuan700 selectSuYuan700ById(String id, Date date);
    public SuYuan700 selectSuYuan46ById(String id, Date date);
    public String selectAddrByXY(double x, double y);
}
src/main/java/com/yssh/service/impl/SuYuanServiceImpl.java
@@ -306,6 +306,14 @@
    }
    @Override
    public SuYuan700 selectSuYuan46ById(String id, Date date) {
        id = id.substring(0, id.lastIndexOf("_") + 1) + "0";
        String time = DateUtils.getYyyyMmDdHhMmSs(date).substring(0, 13) + ":00:00";
        return suYuanMapper.selectSuYuan46ById(id, time);
    }
    @Override
    public String selectAddrByXY(double x, double y) {
        List<Location> locations = locationMapper.selectByXY(x, y);
        if (null != locations && locations.size() > 0) {
src/main/resources/mapping/SuYuanMapper.xml
@@ -169,6 +169,12 @@
        where su_yuan_id = #{id} and create_time = #{time}
        limit 1;
    </select>
    <select id="selectSuYuan46ById" resultType="com.yssh.entity.SuYuan700">
        select * from suyuan_46
        where su_yuan_id = #{id} and create_time = #{time}
        limit 1;
    </select>
    
    <select id="getTemporary" resultMap="TemporaryResult">
        SELECT  x, y, z, u, v, w, format(c, 2) "c"