|
|
|
@ -20,6 +20,7 @@ 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 java.math.BigDecimal;
|
|
|
|
@ -31,6 +32,7 @@ import java.util.List;
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
@Slf4j
|
|
|
|
|
@EnableAsync
|
|
|
|
|
public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@ -88,7 +90,7 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
// @Value("${webservice.sendlimit}")
|
|
|
|
|
// public int sendlimit;
|
|
|
|
|
|
|
|
|
|
public static int sendlimit = 500;
|
|
|
|
|
public static int sendlimit = 1000;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void upload_byq_jbfd(Client client, HashMap<Integer, Niec_Sensors> equipMap) {
|
|
|
|
@ -558,7 +560,6 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
String cacdata = GenerateI2Xml.generateCacXml(Constant.DRJYJC, sensorid, equipmentid, timestamp, attrlist);
|
|
|
|
|
cacdatalist.add(cacdata);
|
|
|
|
|
if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) {
|
|
|
|
|
ArrayList<BigInteger> list1 = new ArrayList<>();
|
|
|
|
|
String xml = GenerateI2Xml.generateEndCacXml(cacdatalist);
|
|
|
|
|
asyncMethod.sendData2(client, xml);
|
|
|
|
|
cacdatalist = new ArrayList<>();
|
|
|
|
@ -1499,7 +1500,6 @@ public class XydlI2ServiceImpl implements XydlI2Service {
|
|
|
|
|
maxid = ids;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
YxAttrBean<Integer> attr = new YxAttrBean<>();
|
|
|
|
|
attr.setSensorid(sensorid);
|
|
|
|
|
attr.setEquipmentid(equipmentid);
|
|
|
|
|