From b77a69357da82a965cd63e76e8ceaf625ec4009b Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 15 七月 2021 16:37:47 +0800
Subject: [PATCH] 1. 新增信访信息获取接口 2. 新增用电量信息获取接口 3. 新增风险评估结果接口 4. 新增污染权重实时分析接口

---
 src/main/kotlin/com/flightfeather/uav/model/epw/EPWDataPrep.kt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/model/epw/EPWDataPrep.kt b/src/main/kotlin/com/flightfeather/uav/model/epw/EPWDataPrep.kt
index 3f23d11..5da6409 100644
--- a/src/main/kotlin/com/flightfeather/uav/model/epw/EPWDataPrep.kt
+++ b/src/main/kotlin/com/flightfeather/uav/model/epw/EPWDataPrep.kt
@@ -86,7 +86,8 @@
         }
 
         lastData.clear()
-        mDataList.subList(mDataList.lastIndex - ncal + 1, mDataList.lastIndex + 1).forEach {
+        val s = if ((mDataList.lastIndex - ncal + 1) < 0) 0 else mDataList.lastIndex - ncal + 1
+        mDataList.subList(s, mDataList.lastIndex + 1).forEach {
             lastData.add(it.copy())
         }
 

--
Gitblit v1.9.3