From ce0aaddd0fc04e69c530a545de25a7a4d7f6fab3 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期四, 06 七月 2023 18:27:19 +0800
Subject: [PATCH] 1

---
 src/main/java/com/yssh/dao/SuYuanMapper.java               |    2 ++
 src/main/java/com/yssh/service/impl/SuYuanServiceImpl.java |    8 ++++++++
 src/main/java/com/yssh/run/InitDataRunner.java             |    2 --
 src/main/java/com/yssh/service/ISuYuanService.java         |    2 ++
 src/main/resources/mapping/SuYuanMapper.xml                |    6 ++++++
 src/main/java/com/yssh/controller/SuYuanController.java    |    9 ++++++++-
 6 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/yssh/controller/SuYuanController.java b/src/main/java/com/yssh/controller/SuYuanController.java
index 08de5b6..97e4c73 100644
--- a/src/main/java/com/yssh/controller/SuYuanController.java
+++ b/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));
diff --git a/src/main/java/com/yssh/dao/SuYuanMapper.java b/src/main/java/com/yssh/dao/SuYuanMapper.java
index dd53845..1127982 100644
--- a/src/main/java/com/yssh/dao/SuYuanMapper.java
+++ b/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);
 }
diff --git a/src/main/java/com/yssh/run/InitDataRunner.java b/src/main/java/com/yssh/run/InitDataRunner.java
index 08d1509..18030f4 100644
--- a/src/main/java/com/yssh/run/InitDataRunner.java
+++ b/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;
diff --git a/src/main/java/com/yssh/service/ISuYuanService.java b/src/main/java/com/yssh/service/ISuYuanService.java
index 6816e77..31eece2 100644
--- a/src/main/java/com/yssh/service/ISuYuanService.java
+++ b/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);
 }
diff --git a/src/main/java/com/yssh/service/impl/SuYuanServiceImpl.java b/src/main/java/com/yssh/service/impl/SuYuanServiceImpl.java
index 3f14383..9e7a9c5 100644
--- a/src/main/java/com/yssh/service/impl/SuYuanServiceImpl.java
+++ b/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) {
diff --git a/src/main/resources/mapping/SuYuanMapper.xml b/src/main/resources/mapping/SuYuanMapper.xml
index 1d0a5a8..f30e3c7 100644
--- a/src/main/resources/mapping/SuYuanMapper.xml
+++ b/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"

--
Gitblit v1.9.3