|
|
|
@ -3,14 +3,13 @@ package com.shxy.i2.serviceimpl;
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import cn.hutool.core.date.DatePattern;
|
|
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
|
|
import cn.hutool.core.date.DateUnit;
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
|
import cn.hutool.core.util.NumberUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.shxy.i2.Tool.AsyncMethod;
|
|
|
|
|
import com.shxy.i2.Tool.GenerateI2Xml;
|
|
|
|
|
import com.shxy.i2.bean.AttrBean;
|
|
|
|
|
import com.shxy.i2.bean.SendDataBean;
|
|
|
|
|
import com.shxy.i2.bean.YxAttrBean;
|
|
|
|
|
import com.shxy.i2.bean.*;
|
|
|
|
|
import com.shxy.i2.constant.Constant;
|
|
|
|
|
import com.shxy.i2.dao.*;
|
|
|
|
|
import com.shxy.i2.dto.Data_YxlDto;
|
|
|
|
@ -19,9 +18,8 @@ import com.shxy.i2.service.XydlI2Service;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.cxf.endpoint.Client;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.scheduling.annotation.EnableAsync;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.math.BigInteger;
|
|
|
|
@ -105,17 +103,10 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
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;
|
|
|
|
|
// }
|
|
|
|
|
// BigDecimal add = NumberUtil.add(value, data_byq_jbfdlist.size());
|
|
|
|
|
// value = add.toBigInteger();
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
|
|
|
|
@ -195,16 +186,12 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.BYQJBFDID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询byq_jbfd的数据量");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -219,9 +206,6 @@ 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;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
@ -275,16 +259,12 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.CNJID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询cnj的数据量");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -298,9 +278,6 @@ 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;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
@ -354,16 +331,12 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.DCYWID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询dcyw的数据量");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -378,9 +351,6 @@ 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;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
@ -455,16 +425,12 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.DLQJBFDID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询到dlq的数据");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -478,9 +444,6 @@ 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;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
|
|
|
|
@ -571,16 +534,12 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.DRJYJCID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询dr_jyjc的数据量");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -594,9 +553,6 @@ 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;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
@ -657,16 +613,12 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.FHDLBXID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询fhdlbx的数据量");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -680,9 +632,6 @@ 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;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
@ -743,16 +692,12 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.FHZXQID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询fhzxq的数据量");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -767,9 +712,6 @@ 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;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
@ -851,16 +793,12 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.JSYHWJYJCID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询jsyhw_jyjc的数据量");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -874,9 +812,6 @@ 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;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
@ -937,16 +872,12 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.SF6QTSFID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询sf6_qtsf的数据量");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -960,9 +891,6 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
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;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
@ -1038,16 +966,12 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.SF6QTYLID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询到sf6_qtyl的数据");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -1061,9 +985,6 @@ 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;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
@ -1125,8 +1046,6 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -1140,9 +1059,6 @@ 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;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
@ -1196,16 +1112,12 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.WSID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询到ws的数据");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_ysp(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
|
// Boolean iscontiue = true;
|
|
|
|
|
// while (iscontiue) {
|
|
|
|
|
//查询目前上传的油色谱的id 记录油色谱上传的id大小
|
|
|
|
|
Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.YSPID);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
@ -1220,9 +1132,6 @@ 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;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
@ -1342,7 +1251,6 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.YSPID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询到ysp的数据");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
@ -1350,8 +1258,6 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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);
|
|
|
|
|
BigInteger value = null;
|
|
|
|
|
if (upload_check == null) {
|
|
|
|
@ -1365,9 +1271,6 @@ 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;
|
|
|
|
|
// }
|
|
|
|
|
ArrayList<String> cacdatalist = new ArrayList<>();
|
|
|
|
|
BigInteger maxid = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
@ -1456,10 +1359,8 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.MICROCLIMATEID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询到microcimate的数据");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -1479,9 +1380,6 @@ 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 = value;
|
|
|
|
|
for (int index = 0; index < list.size(); index++) {
|
|
|
|
|
Data_YxlDto data_yxlDto = list.get(index);
|
|
|
|
@ -1553,10 +1451,8 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
}
|
|
|
|
|
asyncMethod.updateRecordId(maxid, Constant.YXID);
|
|
|
|
|
} else {
|
|
|
|
|
// iscontiue = false;
|
|
|
|
|
log.info("没有查询到yx的数据");
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -1580,5 +1476,125 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
data_yxDao.deleteData(dateTime);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ServiceBody<ListModel> list() {
|
|
|
|
|
ListModel listModel = new ListModel();
|
|
|
|
|
HashMap<String,BigInteger> map = new HashMap();
|
|
|
|
|
List<Upload_check> upload_checks = upload_checkDao.selectAll();
|
|
|
|
|
for (Upload_check item:upload_checks) {
|
|
|
|
|
map.put(item.getCheckType(), item.getValue());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// String today = DateUtil.today();
|
|
|
|
|
String today = "2024-02-01";
|
|
|
|
|
|
|
|
|
|
ListModel.Beans yspbeans = new ListModel.Beans();
|
|
|
|
|
yspbeans.setName("油色谱");
|
|
|
|
|
Data_Ysp data_ysp1 = data_yspDao.selectMaxId();
|
|
|
|
|
Data_Ysp data_ysp2 = data_yspDao.selectNowId(DateUtil.parseDate(today));
|
|
|
|
|
BigInteger yspmaxid = data_ysp1.getMaxid();
|
|
|
|
|
BigInteger yspuploadnum = map.get(Constant.YSPID);
|
|
|
|
|
BigInteger ysptodaymaxid = data_ysp2.getMaxid();
|
|
|
|
|
BigInteger ysptodayminid = data_ysp2.getMinid();
|
|
|
|
|
BigDecimal ysptodaymul = NumberUtil.sub(ysptodaymaxid, ysptodayminid);
|
|
|
|
|
BigDecimal ysptodayupload = NumberUtil.sub(yspuploadnum, ysptodayminid);
|
|
|
|
|
yspbeans.setHistory(yspmaxid);
|
|
|
|
|
yspbeans.setUploadnum(yspuploadnum);
|
|
|
|
|
yspbeans.setNownum(BigInteger.valueOf(ysptodaymul.longValue()));
|
|
|
|
|
yspbeans.setNowuploadnum(BigInteger.valueOf(ysptodayupload.longValue()));
|
|
|
|
|
listModel.getList().add(yspbeans);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ListModel.Beans txbeans = new ListModel.Beans();
|
|
|
|
|
txbeans.setName("铁芯夹件");
|
|
|
|
|
Data_Tx data_tx1 = data_txDao.selectMaxId();
|
|
|
|
|
Data_Tx data_tx2 = data_txDao.selectNowId(DateUtil.parseDate(today));
|
|
|
|
|
BigInteger txmaxid = data_tx1.getMaxid();
|
|
|
|
|
BigInteger txuploadnum = map.get(Constant.TXID);
|
|
|
|
|
BigInteger txtodaymaxid = data_tx2.getMaxid();
|
|
|
|
|
BigInteger txtodayminid = data_tx2.getMinid();
|
|
|
|
|
BigDecimal txtodaymul = NumberUtil.sub(txtodaymaxid, txtodayminid);
|
|
|
|
|
BigDecimal txtodayupload = NumberUtil.sub(txuploadnum, txtodayminid);
|
|
|
|
|
txbeans.setHistory(txmaxid);
|
|
|
|
|
txbeans.setUploadnum(txuploadnum);
|
|
|
|
|
txbeans.setNownum(BigInteger.valueOf(txtodaymul.longValue()));
|
|
|
|
|
txbeans.setNowuploadnum(BigInteger.valueOf(txtodayupload.longValue()));
|
|
|
|
|
listModel.getList().add(txbeans);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ListModel.Beans dlqbeans = new ListModel.Beans();
|
|
|
|
|
dlqbeans.setName("断路器局放");
|
|
|
|
|
Data_Dlq_Jbfd data_dlq_jbfd1 = data_dlq_jbfdDao.selectMaxId();
|
|
|
|
|
Data_Dlq_Jbfd data_dlq_jbfd2 = data_dlq_jbfdDao.selectNowId(DateUtil.parseDate(today));
|
|
|
|
|
BigInteger dlqmaxid = data_dlq_jbfd1.getMaxid();
|
|
|
|
|
BigInteger dlquploadnum = map.get(Constant.DLQJBFDID);
|
|
|
|
|
BigInteger dlqtodaymaxid = data_dlq_jbfd2.getMaxid();
|
|
|
|
|
BigInteger dlqtodayminid = data_dlq_jbfd2.getMinid();
|
|
|
|
|
BigDecimal dlqtodaymul = NumberUtil.sub(dlqtodaymaxid, dlqtodayminid);
|
|
|
|
|
BigDecimal dlqtodayupload = NumberUtil.sub(dlquploadnum, dlqtodayminid);
|
|
|
|
|
dlqbeans.setHistory(dlqmaxid);
|
|
|
|
|
dlqbeans.setUploadnum(dlquploadnum);
|
|
|
|
|
dlqbeans.setNownum(BigInteger.valueOf(dlqtodaymul.longValue()));
|
|
|
|
|
dlqbeans.setNowuploadnum(BigInteger.valueOf(dlqtodayupload.longValue()));
|
|
|
|
|
listModel.getList().add(dlqbeans);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ListModel.Beans sf6beans = new ListModel.Beans();
|
|
|
|
|
sf6beans.setName("SF6气体压力");
|
|
|
|
|
Data_SF6_Qtyl data_sf6_qtyl1 = data_sf6_qtylDao.selectMaxId();
|
|
|
|
|
Data_SF6_Qtyl data_sf6_qtyl2 = data_sf6_qtylDao.selectNowId(DateUtil.parseDate(today));
|
|
|
|
|
BigInteger sf6maxid = data_sf6_qtyl1.getMaxid();
|
|
|
|
|
BigInteger sf6uploadnum = map.get(Constant.SF6QTYLID);
|
|
|
|
|
BigInteger sf6todaymaxid = data_sf6_qtyl2.getMaxid();
|
|
|
|
|
BigInteger sf6todayminid = data_sf6_qtyl2.getMinid();
|
|
|
|
|
BigDecimal sf6todaymul = NumberUtil.sub(sf6todaymaxid, sf6todayminid);
|
|
|
|
|
BigDecimal sf6todayupload = NumberUtil.sub(sf6uploadnum, sf6todayminid);
|
|
|
|
|
sf6beans.setHistory(sf6maxid);
|
|
|
|
|
sf6beans.setUploadnum(sf6uploadnum);
|
|
|
|
|
sf6beans.setNownum(BigInteger.valueOf(sf6todaymul.longValue()));
|
|
|
|
|
sf6beans.setNowuploadnum(BigInteger.valueOf(sf6todayupload.longValue()));
|
|
|
|
|
listModel.getList().add(sf6beans);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ListModel.Beans jsybeans = new ListModel.Beans();
|
|
|
|
|
jsybeans.setName("避雷器");
|
|
|
|
|
Data_Jsyhw_Jyjc data_jsyhw_jyjc1 = data_jsyhw_jyjcDao.selectMaxId();
|
|
|
|
|
Data_Jsyhw_Jyjc data_jsyhw_jyjc2 = data_jsyhw_jyjcDao.selectNowId(DateUtil.parseDate(today));
|
|
|
|
|
BigInteger jsymaxid = data_jsyhw_jyjc1.getMaxid();
|
|
|
|
|
BigInteger jsyuploadnum = map.get(Constant.JSYHWJYJCID);
|
|
|
|
|
BigInteger jsytodaymaxid = data_jsyhw_jyjc2.getMaxid();
|
|
|
|
|
BigInteger jsytodayminid = data_jsyhw_jyjc2.getMinid();
|
|
|
|
|
BigDecimal jsytodaymul = NumberUtil.sub(jsytodaymaxid, jsytodayminid);
|
|
|
|
|
BigDecimal jsytodayupload = NumberUtil.sub(jsyuploadnum, jsytodayminid);
|
|
|
|
|
jsybeans.setHistory(jsymaxid);
|
|
|
|
|
jsybeans.setUploadnum(jsyuploadnum);
|
|
|
|
|
jsybeans.setNownum(BigInteger.valueOf(jsytodaymul.longValue()));
|
|
|
|
|
jsybeans.setNowuploadnum(BigInteger.valueOf(jsytodayupload.longValue()));
|
|
|
|
|
listModel.getList().add(jsybeans);
|
|
|
|
|
|
|
|
|
|
ListModel.Beans yxbeans = new ListModel.Beans();
|
|
|
|
|
yxbeans.setName("遥信");
|
|
|
|
|
Data_YxlDto data_yxlDto1 = data_yxDao.selectMaxId();
|
|
|
|
|
Data_YxlDto data_yxlDto2 = data_yxDao.selectNowId(DateUtil.parseDate(today));
|
|
|
|
|
BigInteger yxmaxid = data_yxlDto1.getMaxid();
|
|
|
|
|
BigInteger yxuploadnum = map.get(Constant.YXID);
|
|
|
|
|
BigInteger yxtodaymaxid = data_yxlDto2.getMaxid();
|
|
|
|
|
BigInteger yxtodayminid = data_yxlDto2.getMinid();
|
|
|
|
|
BigDecimal yxtodaymul = NumberUtil.sub(yxtodaymaxid, yxtodayminid);
|
|
|
|
|
BigDecimal yxtodayupload = NumberUtil.sub(yxuploadnum, yxtodayminid);
|
|
|
|
|
yxbeans.setHistory(yxmaxid);
|
|
|
|
|
yxbeans.setUploadnum(yxuploadnum);
|
|
|
|
|
yxbeans.setNownum(BigInteger.valueOf(yxtodaymul.longValue()));
|
|
|
|
|
yxbeans.setNowuploadnum(BigInteger.valueOf(yxtodayupload.longValue()));
|
|
|
|
|
listModel.getList().add(yxbeans);
|
|
|
|
|
|
|
|
|
|
ServiceBody<ListModel> serviceBody = new ServiceBody<ListModel>();
|
|
|
|
|
serviceBody.setCode(ServiceStatus.SUCCESS);
|
|
|
|
|
serviceBody.setData(listModel);
|
|
|
|
|
return serviceBody;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|