|
@@ -6,14 +6,18 @@ import com.fasterxml.jackson.databind.node.JsonNodeFactory;
|
|
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
|
import com.persagy.common.json.JacksonMapper;
|
|
|
import com.persagy.common.web.ListResponse;
|
|
|
-import com.persagy.dmp.config.DmpParameterStorage;
|
|
|
import com.persagy.dmp.common.http.HttpUtils;
|
|
|
+import com.persagy.dmp.config.DmpParameterStorage;
|
|
|
import com.persagy.dmp.rwd.config.RwdConstants;
|
|
|
import com.persagy.dmp.rwd.model.iot.history.InfoCodeModel;
|
|
|
import com.persagy.dmp.rwd.model.iot.history.RequestModel;
|
|
|
+import com.persagy.dmp.rwd.util.MeterUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.util.*;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.Set;
|
|
|
|
|
|
@Service
|
|
|
public class HistoryIotService extends BaseIotService {
|
|
@@ -79,6 +83,12 @@ public class HistoryIotService extends BaseIotService {
|
|
|
param.setError("value of infoCode[" + objectId + ":" + infoCode + "] is null");
|
|
|
return;
|
|
|
}
|
|
|
+ // 判断信息点的值是不是表号-功能号格式
|
|
|
+ if (!MeterUtils.matchFormat(infoCodeValue)) {
|
|
|
+ param.setStatus("error");
|
|
|
+ param.setError("value of infoCode[" + objectId + ":" + infoCode + "][ " + infoCodeValue + "] 不是正确的表号功能号");
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
int idx = infoCodeValue.lastIndexOf("-");
|
|
|
if (idx == -1) {
|