|
@ -1,6 +1,5 @@
|
|
|
package com.yihu.iot.service.analyzer;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.mysql.query.BaseJpaService;
|
|
|
import org.slf4j.Logger;
|
|
@ -80,7 +79,6 @@ public class IotAnalyzerService extends BaseJpaService<WlyyIotD, WlyyIotDDao> {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 单项细表数据存储,因为体征数据上传,不管怎么样都返回成功,若数据未上传则直接查看LOG日志
|
|
|
* @param mapInfo
|
|
@ -89,15 +87,15 @@ public class IotAnalyzerService extends BaseJpaService<WlyyIotD, WlyyIotDDao> {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public boolean analyzerMapD(Map<String,String> mapInfo, String mid,String type)throws Exception{
|
|
|
public boolean analyzerMapD(Map<String,Object> mapInfo, String mid,String type)throws Exception{
|
|
|
boolean addFlag = false;
|
|
|
|
|
|
for (Map.Entry<String, String> entry : mapInfo.entrySet()) {
|
|
|
for (Map.Entry<String, Object> entry : mapInfo.entrySet()) {
|
|
|
String code = entry.getKey().toString();
|
|
|
String value = entry.getValue() == ""?"":entry.getValue().toString();
|
|
|
String value = entry.getValue() == null?"":entry.getValue().toString();
|
|
|
|
|
|
// 当数值为空时,不进行存储操作
|
|
|
if("".equals(value)){
|
|
|
if("".equals(value) || "0".equals(value) || "null".equals(value) ){
|
|
|
continue;
|
|
|
}else {
|
|
|
WlyyIotD wlyyIotD = new WlyyIotD();
|
|
@ -130,8 +128,5 @@ public class IotAnalyzerService extends BaseJpaService<WlyyIotD, WlyyIotDDao> {
|
|
|
}else{
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|