|
|
|
@ -11,6 +11,7 @@ import com.shxy.i2.bean.SendDataBean;
|
|
|
|
|
import com.shxy.i2.constant.CommonStatus;
|
|
|
|
|
import com.shxy.i2.constant.Constant;
|
|
|
|
|
import com.shxy.i2.dao.*;
|
|
|
|
|
import com.shxy.i2.dto.Data_YxlDto;
|
|
|
|
|
import com.shxy.i2.entity.*;
|
|
|
|
|
import com.shxy.i2.service.XydlI2Service;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
@ -71,6 +72,13 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
@Autowired
|
|
|
|
|
private Data_MicroclimateDao data_microclimateDao;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private Upload_checkDao upload_checkDao;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private Data_YxDao data_yxDao;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
AsyncMethod asyncMethod;
|
|
|
|
|
|
|
|
|
@ -1149,4 +1157,96 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
log.info("没有查询到microcimate的数据");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_yx(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.YXID);
|
|
|
|
|
BigInteger value = upload_check.getValue();
|
|
|
|
|
List<Data_YxlDto> list = data_yxDao.selectByPrimaryKey(value);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询microclimate的数据量:" + list.size());
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_YxlDto data_yxlDto = list.get(index);
|
|
|
|
|
Date dtime = data_yxlDto.getDtime();
|
|
|
|
|
String equipmentid = data_yxlDto.getEquipmentId();
|
|
|
|
|
String sensorid = data_yxlDto.getSensorCode();
|
|
|
|
|
String tableName = data_yxlDto.getTableName();
|
|
|
|
|
String field = data_yxlDto.getField();
|
|
|
|
|
Integer ival = data_yxlDto.getIval();
|
|
|
|
|
Integer sadr = data_yxlDto.getSadr();
|
|
|
|
|
String phase = data_yxlDto.getPhase();
|
|
|
|
|
|
|
|
|
|
String data_byq_jbfd = "data_byq_jbfd";
|
|
|
|
|
String data_cnj = "data_cnj";
|
|
|
|
|
String data_dcyw = "data_dcyw";
|
|
|
|
|
String data_dlq_jbfd = "data_dlq_jbfd";
|
|
|
|
|
String data_dr_jyjc = "data_dr_jyjc";
|
|
|
|
|
String data_fhdlbx = "data_fhdlbx";
|
|
|
|
|
String data_fhzxq = "data_fhzxq";
|
|
|
|
|
String data_jsyhw_jyjc = "data_jsyhw_jyjc";
|
|
|
|
|
String data_microclimate = "data_microclimate";
|
|
|
|
|
String data_sf6_qtsf = "data_sf6_qtsf";
|
|
|
|
|
String data_sf6_qtyl = "data_sf6_qtyl";
|
|
|
|
|
String data_tx = "data_tx";
|
|
|
|
|
String data_ws = "data_ws";
|
|
|
|
|
String data_ysp = "data_ysp";
|
|
|
|
|
|
|
|
|
|
if (StrUtil.equals(tableName, data_byq_jbfd)) {
|
|
|
|
|
if (StrUtil.equals(field, "dischargeCapacity")) {
|
|
|
|
|
AttrBean<Integer> attr = new AttrBean<>();
|
|
|
|
|
attr.setKey("DischargeCapacity");
|
|
|
|
|
attr.setValue(ival);
|
|
|
|
|
}
|
|
|
|
|
if (StrUtil.equals(field, "dischargePosition")) {
|
|
|
|
|
AttrBean<Integer> attr = new AttrBean<>();
|
|
|
|
|
attr.setKey("DischargePosition");
|
|
|
|
|
attr.setValue(ival);
|
|
|
|
|
}
|
|
|
|
|
if (StrUtil.equals(field, "pulseCount")) {
|
|
|
|
|
AttrBean<Integer> attr = new AttrBean<>();
|
|
|
|
|
attr.setKey("PulseCount");
|
|
|
|
|
attr.setValue(ival);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StrUtil.equals(field, "dischargeWaveform")) {
|
|
|
|
|
AttrBean<Integer> attr = new AttrBean<>();
|
|
|
|
|
attr.setKey("DischargeWaveform");
|
|
|
|
|
attr.setValue(ival);
|
|
|
|
|
}
|
|
|
|
|
} else if (StrUtil.equals(tableName, data_cnj)) {
|
|
|
|
|
|
|
|
|
|
} else if (StrUtil.equals(tableName, data_dcyw)) {
|
|
|
|
|
|
|
|
|
|
} else if (StrUtil.equals(tableName, data_dlq_jbfd)) {
|
|
|
|
|
|
|
|
|
|
} else if (StrUtil.equals(tableName, data_dr_jyjc)) {
|
|
|
|
|
|
|
|
|
|
} else if (StrUtil.equals(tableName, data_fhdlbx)) {
|
|
|
|
|
|
|
|
|
|
} else if (StrUtil.equals(tableName, data_fhzxq)) {
|
|
|
|
|
|
|
|
|
|
} else if (StrUtil.equals(tableName, data_jsyhw_jyjc)) {
|
|
|
|
|
|
|
|
|
|
} else if (StrUtil.equals(tableName, data_microclimate)) {
|
|
|
|
|
|
|
|
|
|
} else if (StrUtil.equals(tableName, data_sf6_qtsf)) {
|
|
|
|
|
|
|
|
|
|
} else if (StrUtil.equals(tableName, data_sf6_qtyl)) {
|
|
|
|
|
|
|
|
|
|
} else if (StrUtil.equals(tableName, data_tx)) {
|
|
|
|
|
|
|
|
|
|
} else if (StrUtil.equals(tableName, data_ws)) {
|
|
|
|
|
|
|
|
|
|
} else if (StrUtil.equals(tableName, data_ysp)) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|