From 7d74f3fd087d4a8192ed556a6c2e3a2ea3c81cff Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期五, 28 三月 2025 17:43:48 +0800
Subject: [PATCH] 1. 新增扬尘监测数据上传功能

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MonitorDataServiceImpl.kt |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MonitorDataServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MonitorDataServiceImpl.kt
new file mode 100644
index 0000000..282d153
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MonitorDataServiceImpl.kt
@@ -0,0 +1,31 @@
+package cn.flightfeather.supervision.lightshare.service.impl
+
+import cn.flightfeather.supervision.business.autooutput.AopOutput
+import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
+import cn.flightfeather.supervision.domain.ds1.repository.MonitorDataRep
+import cn.flightfeather.supervision.lightshare.service.MonitorDataService
+import cn.flightfeather.supervision.lightshare.vo.AreaVo
+import org.springframework.stereotype.Service
+import org.springframework.transaction.annotation.Transactional
+
+/**
+ *
+ * @date 2025/3/19
+ * @author feiyu02
+ */
+@Service
+class MonitorDataServiceImpl(
+    private val aopOutput: AopOutput,
+    private val monitorDataRep: MonitorDataRep,
+) : MonitorDataService {
+
+    @Transactional
+    override fun uploadDustDataResult(dataList: List<DustDataResult>): Boolean {
+        dataList.forEach { aopOutput.toDbDataResult(it) }
+        return true
+    }
+
+    override fun fetchDustDataResult(areaVo: AreaVo): List<DustDataResult?> {
+        return monitorDataRep.fetchDustDataResult(areaVo)
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.3