|
|
|
@ -88,35 +88,44 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
// @Value("${webservice.sendlimit}")
|
|
|
|
|
// public int sendlimit;
|
|
|
|
|
|
|
|
|
|
public static int sendlimit = 1000;
|
|
|
|
|
public static int sendlimit = 500;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_byq_jbfd(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
//查询目前上传的变压器局部放电的id 记录变压器局部放电上传的id大小
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.BYQJBFDID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
|
//查询目前上传的变压器局部放电的id 记录变压器局部放电上传的id大小
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.BYQJBFDID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
|
} else {
|
|
|
|
|
value = upload_check.getValue();
|
|
|
|
|
if (value == null) {
|
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
|
} else {
|
|
|
|
|
value = upload_check.getValue();
|
|
|
|
|
if (value == null) {
|
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
List<Data_Byq_Jbfd> data_byq_jbfdlist = data_byq_jbfdDao.selectUploadById(value);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(data_byq_jbfdlist)) {
|
|
|
|
|
log.info("查询byq_jbfd的数据量:" + data_byq_jbfdlist.size());
|
|
|
|
|
log.info("查询byq_jbfd的数据量 sendlimit :" + sendlimit);
|
|
|
|
|
if (data_byq_jbfdlist.size() < 1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (data_byq_jbfdlist.size() < 1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
// BigDecimal add = NumberUtil.add(value, data_byq_jbfdlist.size());
|
|
|
|
|
// value = add.toBigInteger();
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
|
|
|
|
|
for (int index = 0; index < data_byq_jbfdlist.size(); index++) {
|
|
|
|
|
Data_Byq_Jbfd item = data_byq_jbfdlist.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -182,18 +191,18 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.BYQJBFDID);
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.BYQJBFDID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询byq_jbfd的数据量");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_cnj(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.CNJID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -208,14 +217,20 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询cnj的数据量:" + list.size());
|
|
|
|
|
log.info("查询cnj的数据量 sendlimit :" + sendlimit);
|
|
|
|
|
if (list.size() < 1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (list.size() < 1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_Cnj item = list.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -258,16 +273,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.CNJID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询cnj的数据量");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_dcyw(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.DCYWID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -281,14 +296,20 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
List<Data_Dcyw> list = data_dcywDao.selectUploadById(value);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询dcyw的数据量:" + list.size());
|
|
|
|
|
if (list.size() < 1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (list.size() < 1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_Dcyw item = list.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -331,16 +352,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.DCYWID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询dcyw的数据量");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_dlq_jbfd(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.DLQJBFDID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -355,14 +376,20 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询dlq_jbfd的数据量:" + list.size());
|
|
|
|
|
log.info("查询dlq_jbfd的数据量 sendlimit :" + sendlimit);
|
|
|
|
|
if (list.size() < 1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (list.size() < 1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_Dlq_Jbfd item = list.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -426,16 +453,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.DLQJBFDID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询到dlq的数据");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_dr_jyjc(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.DRJYJCID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -449,14 +476,22 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
List<Data_Dr_Jyjc> list = data_dr_jyjcDao.selectUploadById(value);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询dr_jyjc的数据量:" + list.size());
|
|
|
|
|
if (list.size() < 1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (list.size() < 1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_Dr_Jyjc item = list.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -535,16 +570,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.DRJYJCID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询dr_jyjc的数据量");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_fhdlbx(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.FHDLBXID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -558,14 +593,20 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
List<Data_Fhdlbx> list = data_fhdlbxDao.selectUploadById(value);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询fhdlbx的数据量:" + list.size());
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (list.size()<1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_Fhdlbx item = list.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -615,16 +656,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.FHDLBXID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询fhdlbx的数据量");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_fhzxq(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.FHZXQID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -638,14 +679,20 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
List<Data_Fhzxq> list = data_fhzxqDao.selectUploadById(value);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询fhzxq的数据量:" + list.size());
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (list.size()<1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_Fhzxq item = list.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -695,16 +742,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.FHZXQID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询fhzxq的数据量");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_jsyhw_jyjc(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.JSYHWJYJCID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -719,14 +766,20 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询jsyhw_jyjc的数据量:" + list.size());
|
|
|
|
|
log.info("查询jsyhw_jyjc的数据量 sendlimit :" + sendlimit);
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (list.size()<1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_Jsyhw_Jyjc item = list.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -797,16 +850,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.JSYHWJYJCID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询jsyhw_jyjc的数据量");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_sf6_qtsf(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.SF6QTSFID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -820,14 +873,20 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
List<Data_SF6_Qtsf> list = data_sf6_qtsfDao.selectUploadById(value);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询sf6_qtsf的数据量:" + list.size());
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (list.size()<1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_SF6_Qtsf item = list.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -877,39 +936,43 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.SF6QTSFID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询sf6_qtsf的数据量");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_sf6_qtyl(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.SF6QTYLID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
|
}else {
|
|
|
|
|
value = upload_check.getValue();
|
|
|
|
|
if (value == null) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.SF6QTYLID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
|
}else {
|
|
|
|
|
value = upload_check.getValue();
|
|
|
|
|
if (value == null) {
|
|
|
|
|
value = BigInteger.valueOf(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
List<Data_SF6_Qtyl> list = data_sf6_qtylDao.selectUploadById(value);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询sf6_qtyl的数据量:" + list.size());
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (list.size()<1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigDecimal add = NumberUtil.add(value, list.size());
|
|
|
|
|
value = add.toBigInteger();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_SF6_Qtyl item = list.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -974,16 +1037,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.SF6QTYLID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询到sf6_qtyl的数据");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_tx(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.TXID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -997,14 +1060,20 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
List<Data_Tx> list = data_txDao.selectUploadById(value);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询tx的数据量:" + list.size());
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (list.size()<1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_Tx item = list.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -1047,16 +1116,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.TXID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询到tx的数据");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_ws(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.WSID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -1070,14 +1139,20 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
List<Data_Ws> list = data_wsDao.selectUploadById(value);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询ws的数据量:" + list.size());
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (list.size()<1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_Ws item = list.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -1120,16 +1195,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.WSID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询到ws的数据");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_ysp(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
//查询目前上传的油色谱的id 记录油色谱上传的id大小
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.YSPID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
@ -1144,14 +1219,20 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
List<Data_Ysp> list = data_yspDao.selectUploadById(value);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询ysp的数据量:" + list.size());
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (list.size()<1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_Ysp item = list.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -1248,7 +1329,6 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
log.info("测试断点3");
|
|
|
|
|
if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) {
|
|
|
|
|
log.info("测试断点4");
|
|
|
|
|
ArrayList<BigInteger> list1 = new ArrayList<>();
|
|
|
|
|
String xml = GenerateI2Xml.generateEndCacXml(cacdatalist);
|
|
|
|
|
log.info("ysp组装完成,开始上传");
|
|
|
|
|
asyncMethod.sendData2(client, xml);
|
|
|
|
@ -1261,16 +1341,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.YSPID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询到ysp的数据");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_microclimate(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.MICROCLIMATEID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -1284,14 +1364,20 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
List<Data_Microclimate> list = data_microclimateDao.selectUploadById(value);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询microclimate的数据量:" + list.size());
|
|
|
|
|
if (list.size()<1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
// if (list.size()<1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_Microclimate item = list.get(index);
|
|
|
|
|
maxid = item.getId();
|
|
|
|
|
BigInteger ids = item.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Niec_Sensors sensors = equipMap.get(item.getEqmid());
|
|
|
|
|
if (sensors == null) {
|
|
|
|
|
continue;
|
|
|
|
@ -1369,16 +1455,16 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.MICROCLIMATEID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询到microcimate的数据");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_yx(Client client) {
|
|
|
|
|
Boolean iscontiue = true;
|
|
|
|
|
while (iscontiue) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.YXID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -1392,10 +1478,10 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
List<Data_YxlDto> list = data_yxDao.selectByPrimaryKey(value);
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
log.info("查询yx的数据量:" + list.size());
|
|
|
|
|
if (list.size() < 1000) {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
}
|
|
|
|
|
BigInteger maxid = null;
|
|
|
|
|
// if (list.size() < 1000) {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
// }
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_YxlDto data_yxlDto = list.get(index);
|
|
|
|
|
Date dtime = data_yxlDto.getDtime();
|
|
|
|
@ -1406,7 +1492,13 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
Integer ival = data_yxlDto.getIval();
|
|
|
|
|
Integer sadr = data_yxlDto.getSadr();
|
|
|
|
|
String phase = data_yxlDto.getPhase();
|
|
|
|
|
maxid = data_yxlDto.getId();
|
|
|
|
|
BigInteger ids = data_yxlDto.getId();
|
|
|
|
|
if (ids != null) {
|
|
|
|
|
int i = ids.compareTo(maxid);
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
YxAttrBean<Integer> attr = new YxAttrBean<>();
|
|
|
|
|
attr.setSensorid(sensorid);
|
|
|
|
@ -1461,10 +1553,10 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.YXID);
|
|
|
|
|
} else {
|
|
|
|
|
iscontiue = false;
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询到yx的数据");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|