|
|
@ -4,13 +4,13 @@ import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
import cn.hutool.core.date.DatePattern;
|
|
|
|
import cn.hutool.core.date.DatePattern;
|
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
|
|
|
|
import cn.hutool.core.util.NumberUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import com.shxy.i2.Tool.AsyncMethod;
|
|
|
|
import com.shxy.i2.Tool.AsyncMethod;
|
|
|
|
import com.shxy.i2.Tool.GenerateI2Xml;
|
|
|
|
import com.shxy.i2.Tool.GenerateI2Xml;
|
|
|
|
import com.shxy.i2.bean.AttrBean;
|
|
|
|
import com.shxy.i2.bean.AttrBean;
|
|
|
|
import com.shxy.i2.bean.SendDataBean;
|
|
|
|
import com.shxy.i2.bean.SendDataBean;
|
|
|
|
import com.shxy.i2.bean.YxAttrBean;
|
|
|
|
import com.shxy.i2.bean.YxAttrBean;
|
|
|
|
import com.shxy.i2.constant.CommonStatus;
|
|
|
|
|
|
|
|
import com.shxy.i2.constant.Constant;
|
|
|
|
import com.shxy.i2.constant.Constant;
|
|
|
|
import com.shxy.i2.dao.*;
|
|
|
|
import com.shxy.i2.dao.*;
|
|
|
|
import com.shxy.i2.dto.Data_YxlDto;
|
|
|
|
import com.shxy.i2.dto.Data_YxlDto;
|
|
|
@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.math.BigInteger;
|
|
|
|
import java.math.BigInteger;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
@ -84,17 +85,21 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
AsyncMethod asyncMethod;
|
|
|
|
AsyncMethod asyncMethod;
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${webservice.receivetime}")
|
|
|
|
// @Value("${webservice.sendlimit}")
|
|
|
|
public int sendlimit;
|
|
|
|
// public int sendlimit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static int sendlimit = 1000;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_byq_jbfd(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_byq_jbfd(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
//查询目前上传的变压器局部放电的id 记录变压器局部放电上传的id大小
|
|
|
|
//查询目前上传的变压器局部放电的id 记录变压器局部放电上传的id大小
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.BYQJBFDID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.BYQJBFDID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
value = upload_check.getValue();
|
|
|
|
value = upload_check.getValue();
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
@ -103,6 +108,10 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
List<Data_Byq_Jbfd> data_byq_jbfdlist = data_byq_jbfdDao.selectUploadById(value);
|
|
|
|
List<Data_Byq_Jbfd> data_byq_jbfdlist = data_byq_jbfdDao.selectUploadById(value);
|
|
|
|
if (CollectionUtil.isNotEmpty(data_byq_jbfdlist)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(data_byq_jbfdlist)) {
|
|
|
|
log.info("查询byq_jbfd的数据量:" + data_byq_jbfdlist.size());
|
|
|
|
log.info("查询byq_jbfd的数据量:" + data_byq_jbfdlist.size());
|
|
|
|
|
|
|
|
log.info("查询byq_jbfd的数据量 sendlimit :" + sendlimit);
|
|
|
|
|
|
|
|
if (data_byq_jbfdlist.size() < 1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < data_byq_jbfdlist.size(); index++) {
|
|
|
|
for (int index = 0; index < data_byq_jbfdlist.size(); index++) {
|
|
|
@ -173,19 +182,23 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.BYQJBFDID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.BYQJBFDID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询byq_jbfd的数据量");
|
|
|
|
log.info("没有查询byq_jbfd的数据量");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_cnj(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_cnj(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.CNJID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.CNJID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
value = upload_check.getValue();
|
|
|
|
value = upload_check.getValue();
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
@ -194,6 +207,10 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
List<Data_Cnj> list = data_cnjDao.selectUploadById(value);
|
|
|
|
List<Data_Cnj> list = data_cnjDao.selectUploadById(value);
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("查询cnj的数据量:" + list.size());
|
|
|
|
log.info("查询cnj的数据量:" + list.size());
|
|
|
|
|
|
|
|
log.info("查询cnj的数据量 sendlimit :" + sendlimit);
|
|
|
|
|
|
|
|
if (list.size() < 1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
@ -239,19 +256,23 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.CNJID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.CNJID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询cnj的数据量");
|
|
|
|
log.info("没有查询cnj的数据量");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_dcyw(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_dcyw(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.DCYWID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.DCYWID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
value = upload_check.getValue();
|
|
|
|
value = upload_check.getValue();
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
@ -260,6 +281,9 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
List<Data_Dcyw> list = data_dcywDao.selectUploadById(value);
|
|
|
|
List<Data_Dcyw> list = data_dcywDao.selectUploadById(value);
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("查询dcyw的数据量:" + list.size());
|
|
|
|
log.info("查询dcyw的数据量:" + list.size());
|
|
|
|
|
|
|
|
if (list.size() < 1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
@ -305,19 +329,23 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.DCYWID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.DCYWID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询dcyw的数据量");
|
|
|
|
log.info("没有查询dcyw的数据量");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_dlq_jbfd(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_dlq_jbfd(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.DLQJBFDID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.DLQJBFDID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
value = upload_check.getValue();
|
|
|
|
value = upload_check.getValue();
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
@ -326,6 +354,10 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
List<Data_Dlq_Jbfd> list = data_dlq_jbfdDao.selectUploadById(value);
|
|
|
|
List<Data_Dlq_Jbfd> list = data_dlq_jbfdDao.selectUploadById(value);
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("查询dlq_jbfd的数据量:" + list.size());
|
|
|
|
log.info("查询dlq_jbfd的数据量:" + list.size());
|
|
|
|
|
|
|
|
log.info("查询dlq_jbfd的数据量 sendlimit :" + sendlimit);
|
|
|
|
|
|
|
|
if (list.size() < 1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
@ -382,11 +414,9 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String cacdata = GenerateI2Xml.generateCacXml(Constant.DLQJBFD, sensorid, equipmentid, timestamp, attrlist);
|
|
|
|
String cacdata = GenerateI2Xml.generateCacXml(Constant.DLQJBFD, sensorid, equipmentid, timestamp, attrlist);
|
|
|
|
cacdatalist.add(cacdata);
|
|
|
|
cacdatalist.add(cacdata);
|
|
|
|
BigInteger id = item.getId();
|
|
|
|
|
|
|
|
if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) {
|
|
|
|
if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) {
|
|
|
|
String xml = GenerateI2Xml.generateEndCacXml(cacdatalist);
|
|
|
|
String xml = GenerateI2Xml.generateEndCacXml(cacdatalist);
|
|
|
|
asyncMethod.sendData2(client,xml);
|
|
|
|
asyncMethod.sendData2(client, xml);
|
|
|
|
maxid = BigInteger.valueOf(0);
|
|
|
|
|
|
|
|
cacdatalist = new ArrayList<>();
|
|
|
|
cacdatalist = new ArrayList<>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
@ -394,19 +424,23 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.DLQJBFDID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.DLQJBFDID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询到dlq的数据");
|
|
|
|
log.info("没有查询到dlq的数据");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_dr_jyjc(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_dr_jyjc(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.DRJYJCID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.DRJYJCID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
value = upload_check.getValue();
|
|
|
|
value = upload_check.getValue();
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
@ -415,6 +449,9 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
List<Data_Dr_Jyjc> list = data_dr_jyjcDao.selectUploadById(value);
|
|
|
|
List<Data_Dr_Jyjc> list = data_dr_jyjcDao.selectUploadById(value);
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("查询dr_jyjc的数据量:" + list.size());
|
|
|
|
log.info("查询dr_jyjc的数据量:" + list.size());
|
|
|
|
|
|
|
|
if (list.size() < 1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
@ -496,19 +533,23 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.DRJYJCID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.DRJYJCID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询dr_jyjc的数据量");
|
|
|
|
log.info("没有查询dr_jyjc的数据量");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_fhdlbx(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_fhdlbx(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.FHDLBXID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.FHDLBXID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
value = upload_check.getValue();
|
|
|
|
value = upload_check.getValue();
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
@ -517,6 +558,9 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
List<Data_Fhdlbx> list = data_fhdlbxDao.selectUploadById(value);
|
|
|
|
List<Data_Fhdlbx> list = data_fhdlbxDao.selectUploadById(value);
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("查询fhdlbx的数据量:" + list.size());
|
|
|
|
log.info("查询fhdlbx的数据量:" + list.size());
|
|
|
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
@ -561,7 +605,7 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
cacdatalist.add(cacdata);
|
|
|
|
cacdatalist.add(cacdata);
|
|
|
|
if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) {
|
|
|
|
if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) {
|
|
|
|
String xml = GenerateI2Xml.generateEndCacXml(cacdatalist);
|
|
|
|
String xml = GenerateI2Xml.generateEndCacXml(cacdatalist);
|
|
|
|
asyncMethod.sendData2(client,xml);
|
|
|
|
asyncMethod.sendData2(client, xml);
|
|
|
|
cacdatalist = new ArrayList<>();
|
|
|
|
cacdatalist = new ArrayList<>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
@ -569,27 +613,34 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.FHDLBXID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.FHDLBXID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询fhdlbx的数据量");
|
|
|
|
log.info("没有查询fhdlbx的数据量");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_fhzxq(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_fhzxq(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.FHZXQID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.FHZXQID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
value = upload_check.getValue();
|
|
|
|
value = upload_check.getValue();
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<Data_Fhzxq> list = data_fhzxqDao.selectUpload(CommonStatus.UNUPLOAD.value());
|
|
|
|
List<Data_Fhzxq> list = data_fhzxqDao.selectUploadById(value);
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("查询fhzxq的数据量:" + list.size());
|
|
|
|
log.info("查询fhzxq的数据量:" + list.size());
|
|
|
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
@ -642,19 +693,23 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.FHZXQID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.FHZXQID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询fhzxq的数据量");
|
|
|
|
log.info("没有查询fhzxq的数据量");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_jsyhw_jyjc(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_jsyhw_jyjc(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.JSYHWJYJCID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.JSYHWJYJCID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
value = upload_check.getValue();
|
|
|
|
value = upload_check.getValue();
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
@ -663,6 +718,10 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
List<Data_Jsyhw_Jyjc> list = data_jsyhw_jyjcDao.selectUploadById(value);
|
|
|
|
List<Data_Jsyhw_Jyjc> list = data_jsyhw_jyjcDao.selectUploadById(value);
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("查询jsyhw_jyjc的数据量:" + list.size());
|
|
|
|
log.info("查询jsyhw_jyjc的数据量:" + list.size());
|
|
|
|
|
|
|
|
log.info("查询jsyhw_jyjc的数据量 sendlimit :" + sendlimit);
|
|
|
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
@ -736,19 +795,23 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.JSYHWJYJCID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.JSYHWJYJCID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询jsyhw_jyjc的数据量");
|
|
|
|
log.info("没有查询jsyhw_jyjc的数据量");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_sf6_qtsf(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_sf6_qtsf(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.SF6QTSFID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.SF6QTSFID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
value = upload_check.getValue();
|
|
|
|
value = upload_check.getValue();
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
@ -757,6 +820,9 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
List<Data_SF6_Qtsf> list = data_sf6_qtsfDao.selectUploadById(value);
|
|
|
|
List<Data_SF6_Qtsf> list = data_sf6_qtsfDao.selectUploadById(value);
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("查询sf6_qtsf的数据量:" + list.size());
|
|
|
|
log.info("查询sf6_qtsf的数据量:" + list.size());
|
|
|
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
@ -809,17 +875,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.SF6QTSFID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.SF6QTSFID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询sf6_qtsf的数据量");
|
|
|
|
log.info("没有查询sf6_qtsf的数据量");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_sf6_qtyl(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_sf6_qtyl(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.SF6QTYLID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.SF6QTYLID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
@ -830,14 +895,18 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
List<Data_SF6_Qtyl> list = data_sf6_qtylDao.selectUploadById(value);
|
|
|
|
List<Data_SF6_Qtyl> list = data_sf6_qtylDao.selectUploadById(value);
|
|
|
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
|
|
|
log.info("查询sf6_qtyl的数据量:" + list.size());
|
|
|
|
if (list.size()<1000) {
|
|
|
|
if (list.size()<1000) {
|
|
|
|
iscontiue = false;
|
|
|
|
iscontiue = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
|
|
|
log.info("查询sf6_qtyl的数据量:" + list.size());
|
|
|
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
|
|
|
BigDecimal add = NumberUtil.add(value, list.size());
|
|
|
|
|
|
|
|
value = add.toBigInteger();
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
Data_SF6_Qtyl item = list.get(index);
|
|
|
|
Data_SF6_Qtyl item = list.get(index);
|
|
|
|
maxid = item.getId();
|
|
|
|
maxid = item.getId();
|
|
|
@ -905,6 +974,7 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.SF6QTYLID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.SF6QTYLID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询到sf6_qtyl的数据");
|
|
|
|
log.info("没有查询到sf6_qtyl的数据");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -912,11 +982,13 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_tx(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_tx(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.TXID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.TXID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
value = upload_check.getValue();
|
|
|
|
value = upload_check.getValue();
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
@ -925,6 +997,9 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
List<Data_Tx> list = data_txDao.selectUploadById(value);
|
|
|
|
List<Data_Tx> list = data_txDao.selectUploadById(value);
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("查询tx的数据量:" + list.size());
|
|
|
|
log.info("查询tx的数据量:" + list.size());
|
|
|
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
@ -970,19 +1045,23 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.TXID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.TXID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询到tx的数据");
|
|
|
|
log.info("没有查询到tx的数据");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_ws(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_ws(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.WSID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.WSID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
value = upload_check.getValue();
|
|
|
|
value = upload_check.getValue();
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
@ -991,6 +1070,9 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
List<Data_Ws> list = data_wsDao.selectUploadById(value);
|
|
|
|
List<Data_Ws> list = data_wsDao.selectUploadById(value);
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("查询ws的数据量:" + list.size());
|
|
|
|
log.info("查询ws的数据量:" + list.size());
|
|
|
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
@ -1036,32 +1118,39 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.WSID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.WSID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询到ws的数据");
|
|
|
|
log.info("没有查询到ws的数据");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_ysp(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_ysp(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
//查询目前上传的油色谱的id 记录油色谱上传的id大小
|
|
|
|
//查询目前上传的油色谱的id 记录油色谱上传的id大小
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.YSPID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.YSPID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
value = upload_check.getValue();
|
|
|
|
value = upload_check.getValue();
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<Data_Ysp> dataYspList = data_yspDao.selectUploadById(value);
|
|
|
|
List<Data_Ysp> list = data_yspDao.selectUploadById(value);
|
|
|
|
if (CollectionUtil.isNotEmpty(dataYspList)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("查询ysp的数据量:" + dataYspList.size());
|
|
|
|
log.info("查询ysp的数据量:" + list.size());
|
|
|
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < dataYspList.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
Data_Ysp item = dataYspList.get(index);
|
|
|
|
Data_Ysp item = list.get(index);
|
|
|
|
maxid = item.getId();
|
|
|
|
maxid = item.getId();
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
if (sensors == null) {
|
|
|
|
if (sensors == null) {
|
|
|
@ -1157,7 +1246,7 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
String cacdata = GenerateI2Xml.generateCacXml(Constant.YSP, sensorid, equipmentid, timestamp, attrlist);
|
|
|
|
String cacdata = GenerateI2Xml.generateCacXml(Constant.YSP, sensorid, equipmentid, timestamp, attrlist);
|
|
|
|
cacdatalist.add(cacdata);
|
|
|
|
cacdatalist.add(cacdata);
|
|
|
|
log.info("测试断点3");
|
|
|
|
log.info("测试断点3");
|
|
|
|
if ((index != 0 && index % sendlimit == 0) || index == (dataYspList.size() - 1)) {
|
|
|
|
if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) {
|
|
|
|
log.info("测试断点4");
|
|
|
|
log.info("测试断点4");
|
|
|
|
ArrayList<BigInteger> list1 = new ArrayList<>();
|
|
|
|
ArrayList<BigInteger> list1 = new ArrayList<>();
|
|
|
|
String xml = GenerateI2Xml.generateEndCacXml(cacdatalist);
|
|
|
|
String xml = GenerateI2Xml.generateEndCacXml(cacdatalist);
|
|
|
@ -1170,20 +1259,23 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.YSPID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.YSPID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询到ysp的数据");
|
|
|
|
log.info("没有查询到ysp的数据");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_microclimate(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
public void upload_microclimate(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
|
|
|
while (iscontiue) {
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.MICROCLIMATEID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.MICROCLIMATEID);
|
|
|
|
BigInteger value = null;
|
|
|
|
BigInteger value = null;
|
|
|
|
if (upload_check == null) {
|
|
|
|
if (upload_check == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
value = upload_check.getValue();
|
|
|
|
value = upload_check.getValue();
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
@ -1192,6 +1284,9 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
List<Data_Microclimate> list = data_microclimateDao.selectUploadById(value);
|
|
|
|
List<Data_Microclimate> list = data_microclimateDao.selectUploadById(value);
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("查询microclimate的数据量:" + list.size());
|
|
|
|
log.info("查询microclimate的数据量:" + list.size());
|
|
|
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
BigInteger maxid = null;
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
@ -1272,17 +1367,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.MICROCLIMATEID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.MICROCLIMATEID);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
log.info("没有查询到microcimate的数据");
|
|
|
|
log.info("没有查询到microcimate的数据");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void upload_yx(Client client) {
|
|
|
|
public void upload_yx(Client client) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
while (iscontiue) {
|
|
|
|
while (iscontiue) {
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.YXID);
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.YXID);
|
|
|
@ -1296,12 +1390,12 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<Data_YxlDto> list = data_yxDao.selectByPrimaryKey(value);
|
|
|
|
List<Data_YxlDto> list = data_yxDao.selectByPrimaryKey(value);
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("查询yx的数据量:" + list.size());
|
|
|
|
log.info("查询yx的数据量:" + list.size());
|
|
|
|
BigInteger maxid =null;
|
|
|
|
if (list.size() < 1000) {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
Data_YxlDto data_yxlDto = list.get(index);
|
|
|
|
Data_YxlDto data_yxlDto = list.get(index);
|
|
|
|
Date dtime = data_yxlDto.getDtime();
|
|
|
|
Date dtime = data_yxlDto.getDtime();
|
|
|
@ -1365,7 +1459,10 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
asyncMethod.updateRecordId(maxid,Constant.YXID);
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.YXID);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
|
|
|
log.info("没有查询到yx的数据");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1373,7 +1470,7 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void clear_history() {
|
|
|
|
public void clear_history() {
|
|
|
|
log.info("开启定时删除");
|
|
|
|
log.info("开启定时删除");
|
|
|
|
DateTime dateTime = DateUtil.offsetDay(new Date(), -7);
|
|
|
|
DateTime dateTime = DateUtil.offsetDay(new Date(), -3);
|
|
|
|
data_byq_jbfdDao.deleteData(dateTime);
|
|
|
|
data_byq_jbfdDao.deleteData(dateTime);
|
|
|
|
data_cnjDao.deleteData(dateTime);
|
|
|
|
data_cnjDao.deleteData(dateTime);
|
|
|
|
data_dcywDao.deleteData(dateTime);
|
|
|
|
data_dcywDao.deleteData(dateTime);
|
|
|
|